Client: Crashing out on notices with nicks fix
authorDarren <darren@darrenwhitlen.com>
Fri, 9 Aug 2013 10:33:35 +0000 (11:33 +0100)
committerDarren <darren@darrenwhitlen.com>
Fri, 9 Aug 2013 10:33:35 +0000 (11:33 +0100)
client/assets/src/models/network.js

index 0f5c901f3240f10c81553bdc0105a8b9b53012c3..22a7c1f035f41e670e17f7e2ecb9061f74603d00 100644 (file)
             panel = this.panels.getByName(event.target) || this.panels.getByName(event.nick);
 
             // Forward ChanServ messages to its associated channel
-            if (event.nick.toLowerCase() == 'chanserv' && event.msg.charAt(0) == '[') {
+            if (event.nick && event.nick.toLowerCase() == 'chanserv' && event.msg.charAt(0) == '[') {
                 channel_name = /\[([^ \]]+)\]/gi.exec(event.msg);
                 if (channel_name && channel_name[1]) {
                     channel_name = channel_name[1];