]> jfr.im git - irc/quakenet/qwebirc.git/commitdiff
Fixes issue 28 (parsing of 'channel modes are'/'channel created at' numerics).
authorChris Porter <redacted>
Mon, 22 Jun 2009 01:07:36 +0000 (02:07 +0100)
committerChris Porter <redacted>
Mon, 22 Jun 2009 01:07:36 +0000 (02:07 +0100)
js/irc/baseircclient.js
js/irc/ircclient.js
js/irc/numerics.js
js/ui/theme.js

index 0c1e314f69f67a832588be326a9741e151a514c4..9f3c78ae1c117e5160834de876a8c6b2d7b0a34c 100644 (file)
@@ -453,5 +453,17 @@ qwebirc.irc.BaseIRCClient = new Class({
     
     this.wallops(user, text);
     return true;
+  },
+  irc_RPL_CREATIONTIME: function(prefix, params) {
+    var channel = params[1];
+    var time = params[2];
+
+    this.channelCreationTime(channel, time);    
+  },
+  irc_RPL_CHANNELMODEIS: function(prefix, params) {
+    var channel = params[1];
+    var modes = params.slice(2);
+
+    this.channelModeIs(channel, modes);
   }
 });
index b5a3183c9b6cbd6baee39def53cdec74abe62bd0..a4d193ec26b740c15adae4405fb603216a9298cd 100644 (file)
@@ -611,5 +611,11 @@ qwebirc.irc.IRCClient = new Class({
     var host = user.hostToHost();
 
     this.newServerLine("WALLOPS", {t: text, n: nick, h: host});
-  }
+  },
+  channelModeIs: function(channel, modes) {
+    this.newTargetOrActiveLine(channel, "CHANNELMODEIS", {c: channel, m: modes.join(" ")});
+  },
+  channelCreationTime: function(channel, time) {
+    this.newTargetOrActiveLine(channel, "CHANNELCREATIONTIME", {c: channel, m: qwebirc.irc.IRCDate(new Date(time * 1000))});
+  }  
 });
index 9f5f7010073bd21ad87ded40123b7a306d102626..5afc95b1f3a153112d181ce25c88863d45942968 100644 (file)
@@ -23,5 +23,7 @@ qwebirc.irc.Numerics = {
   "404": "ERR_CANNOTSENDTOCHAN",
   "482": "ERR_CHANOPPRIVSNEEDED",
   "305": "RPL_UNAWAY",
-  "306": "RPL_NOWAWAY"
+  "306": "RPL_NOWAWAY",
+  "324": "RPL_CHANNELMODEIS",
+  "329": "RPL_CREATIONTIME"
 };
index 07f80233bd0eee47e36e47608e23a1d3d111fb68..bd0b2a8db39804c8384b996fb6b80c2b195c46e8 100644 (file)
@@ -63,7 +63,9 @@ qwebirc.ui.themes.Default = {
   "AWAY": ["$N is away: $m", true],
   "GENERICERROR": ["$m: $t", true],
   "GENERICMESSAGE": ["$m", true],
-  "WALLOPS": ["WALLOP $n: $t", true]
+  "WALLOPS": ["WALLOP $n: $t", true],
+  "CHANNELCREATIONTIME": ["Channel $c was created at: $m", true],
+  "CHANNELMODEIS": ["Channel modes on $c are: $m", true]
 };
 
 qwebirc.ui.Theme = new Class({