[listener] Prevent irc nick from becoming null
This commit is contained in:
parent
d9d50195d9
commit
dd9c1db9f6
|
@ -41,12 +41,12 @@ namespace SparkleLib {
|
||||||
|
|
||||||
Server = server;
|
Server = server;
|
||||||
Channel = channel;
|
Channel = channel;
|
||||||
|
Nick = nick;
|
||||||
|
|
||||||
//TODO: check why nick is sometimes null
|
if (!Nick.Equals (""))
|
||||||
if (Nick != null)
|
|
||||||
Nick = nick.Replace ("@", "_at_").Replace (".", "_dot_");
|
Nick = nick.Replace ("@", "_at_").Replace (".", "_dot_");
|
||||||
else
|
else
|
||||||
Nick = "oops";
|
Nick = "anonymous";
|
||||||
|
|
||||||
// Keep the nick short
|
// Keep the nick short
|
||||||
if (Nick.Length > 9)
|
if (Nick.Length > 9)
|
||||||
|
|
Loading…
Reference in a new issue