Browse files

Merged pull request #11 from luscoma/master.

Bug fix in join/part/kick events
  • Loading branch information...
2 parents c6b44b6 + 549d62f commit 5204bcc749a804982e5786742af3cb1d6e160fbc @martynsmith committed Apr 29, 2011
Showing with 6 additions and 6 deletions.
  1. +6 −6 lib/irc.js
View
12 lib/irc.js
@@ -680,12 +680,12 @@ function Client(server, nick, opt) {
self.emit('join', message.args[0], message.nick);
self.emit('join' + message.args[0], message.nick);
if ( self.nick == message.nick ) {
- self.chans[message.args[0]] = {
+ self.chans[message.args[0].toLowerCase()] = {
users: {},
};
}
else {
- var channel = self.chans[message.args[0]];
+ var channel = self.chans[message.args[0].toLowerCase()];
channel.users[message.nick] = '';
}
break;
@@ -694,10 +694,10 @@ function Client(server, nick, opt) {
self.emit('part', message.args[0], message.nick, message.args[1]);
self.emit('part' + message.args[0], message.nick, message.args[1]);
if ( self.nick == message.nick ) {
- delete self.chans[message.args[0]];
+ delete self.chans[message.args[0].toLowerCase()];
}
else {
- var channel = self.chans[message.args[0]];
+ var channel = self.chans[message.args[0].toLowerCase()];
delete channel.users[message.nick];
}
break;
@@ -707,10 +707,10 @@ function Client(server, nick, opt) {
self.emit('kick' + message.args[0], message.args[1], message.nick, message.args[2]);
if ( self.nick == message.args[1] ) {
- delete self.chans[message.args[0]];
+ delete self.chans[message.args[0].toLowerCase()];
}
else {
- var channel = self.chans[message.args[0]];
+ var channel = self.chans[message.args[0].toLowerCase()];
delete channel.users[message.args[1]];
}
break;

0 comments on commit 5204bcc

Please sign in to comment.