]> jfr.im git - irc/quakenet/qwebirc.git/blobdiff - js/irc/commands.js
enhancements:
[irc/quakenet/qwebirc.git] / js / irc / commands.js
index 79d0c29fa57d8ad4473c4a2f5cb76e98f5736f78..af9fb74ebc13034f78e943f04061a4b17d3d1bec 100644 (file)
@@ -10,7 +10,8 @@ qwebirc.irc.Commands = new Class({
       "Q": "QUERY",
       "BACK": "AWAY",
       "PRIVACY": "PRIVACYPOLICY",
-      "HOP": "CYCLE"
+      "HOP": "CYCLE",
+      "": "SAY"
     };
   },
   
@@ -141,7 +142,12 @@ qwebirc.irc.Commands = new Class({
     this.automode("-", "v", args);
   }],
   cmd_TOPIC: [true, 1, 1, function(args) {
-    this.send("TOPIC " + this.getActiveWindow().name + " :" + args[0]);
+    var w = this.getActiveWindow();
+    if(w.client.isChannel(args[0])) {
+      this.send("TOPIC " + args[0]);
+    } else {
+      this.send("TOPIC " + w.name + " :" + args[0]);
+    }
   }],
   cmd_AWAY: [false, 1, 0, function(args) {
     this.send("AWAY :" + (args?args[0]:""));