]> jfr.im git - irc/quakenet/qwebirc.git/commitdiff
Add /part and fix /kick.
authorChris Porter <redacted>
Sun, 19 Oct 2008 00:09:30 +0000 (01:09 +0100)
committerChris Porter <redacted>
Sun, 19 Oct 2008 00:09:30 +0000 (01:09 +0100)
js/irc/commandparser.js

index 7ff8313fc0e1beac59b849a11ef8a68d0d74cbe2..f3dc51edca94c883bf7a9afabe29877c0dfd8206 100644 (file)
@@ -166,7 +166,7 @@ qwebirc.irc.CommandParser = new Class({
       aw.addLine("", x);
     });
   }],
-  KICK: [true, 3, 2, function(args) {
+  cmd_KICK: [true, 3, 2, function(args) {
     var channel = args[0];
     var target = args[1];
     var message = args[2];
@@ -174,5 +174,14 @@ qwebirc.irc.CommandParser = new Class({
       message = "";
     
     this.send("KICK " + channel + " " + target + " :" + message);
+  }],
+  cmd_PART: [true, 1, 0, function(args) {
+    var channel = this.parentObject.getActiveWindow().name;
+    var message = "";
+
+    if(args)    
+      message = args[0];
+    
+    this.send("PART " + channel + " :" + message);
   }]
 });