From dd9c1db9f626766ccc06c91512fc18f8e5a5276a Mon Sep 17 00:00:00 2001 From: Hylke Bons Date: Sat, 20 Nov 2010 23:18:55 +0000 Subject: [PATCH] [listener] Prevent irc nick from becoming null --- SparkleLib/SparkleListener.cs | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/SparkleLib/SparkleListener.cs b/SparkleLib/SparkleListener.cs index 73fd9530..88c8a7ec 100644 --- a/SparkleLib/SparkleListener.cs +++ b/SparkleLib/SparkleListener.cs @@ -41,12 +41,12 @@ namespace SparkleLib { Server = server; Channel = channel; + Nick = nick; - //TODO: check why nick is sometimes null - if (Nick != null) - Nick = nick.Replace ("@", "_at_").Replace (".", "_dot_"); + if (!Nick.Equals ("")) + Nick = nick.Replace ("@", "_at_").Replace (".", "_dot_"); else - Nick = "oops"; + Nick = "anonymous"; // Keep the nick short if (Nick.Length > 9)