Fix regression on kick messages
authorCory Chaplin <cory.chaplin@laposte.net>
Fri, 24 Jan 2014 12:40:38 +0000 (13:40 +0100)
committerCory Chaplin <cory.chaplin@laposte.net>
Fri, 24 Jan 2014 12:40:38 +0000 (13:40 +0100)
server/irc/channel.js

index 926aedd2119065e793a13e81bc9053899f2fddf5..5aebcb068ad7ee19072afc34881612ef2f8c7918 100644 (file)
@@ -84,18 +84,20 @@ function onPart(event) {
 
 
 function onKick(event) {
+    var that = this;
+
     global.modules.emit('irc channel kick', {
         channel: this,
         connection: this.irc_connection,
         irc_event: event
     })
     .done(function() {
-        this.irc_connection.clientEvent('kick', {
+        that.irc_connection.clientEvent('kick', {
             kicked: event.kicked,  // Nick of the kicked
             nick: event.nick, // Nick of the kicker
             ident: event.ident,
             hostname: event.hostname,
-            channel: this.name,
+            channel: that.name,
             message: event.message,
             time: event.time
         });