]> jfr.im git - irc/quakenet/qwebirc.git/blobdiff - js/irc/baseircclient.js
Merge websockets into quakenet.
[irc/quakenet/qwebirc.git] / js / irc / baseircclient.js
index 948e6f7ed01371e0010701aca438f336317b3063..5d0c8f7e360466b8aca77ffa376c4f42bb2a71b2 100644 (file)
@@ -5,7 +5,7 @@ qwebirc.irc.PMODE_REGULAR_MODE = 3;
 
 qwebirc.irc.RegisteredCTCPs = {
   "VERSION": function(x) {
-    return "qwebirc v" + qwebirc.VERSION + ", copyright (C) 2008-2012 Chris Porter and the qwebirc project -- " + qwebirc.util.browserVersion();
+    return "qwebirc v" + qwebirc.VERSION + ", copyright (C) 2008-2014 Chris Porter and the qwebirc project -- transport: " + this.connection.transportStatus + " -- " + qwebirc.util.browserVersion();
   },
   "USERINFO": function(x) { return "qwebirc"; },
   "TIME": function(x) { return qwebirc.irc.IRCDate(new Date()); },
@@ -233,9 +233,10 @@ qwebirc.irc.BaseIRCClient = new Class({
       var replyfn = qwebirc.irc.RegisteredCTCPs[type];
       if(replyfn) {
         var t = new Date().getTime() / 1000;
-        if(t > this.nextctcp)
-          this.send("NOTICE " + user.hostToNick() + " :\x01" + type + " " + replyfn(ctcp[1]) + "\x01");
-        this.nextctcp = t + 5;
+        if(t > this.nextctcp) {
+          this.send("NOTICE " + user.hostToNick() + " :\x01" + type + " " + replyfn.call(this, ctcp[1]) + "\x01");
+          this.nextctcp = t + 10;
+        }
       }
       
       if(target == this.nickname) {