]> jfr.im git - irc/quakenet/qwebirc.git/commitdiff
Fix /whois on non-existant nick.
authorChris Porter <redacted>
Sun, 19 Oct 2008 01:22:00 +0000 (02:22 +0100)
committerChris Porter <redacted>
Sun, 19 Oct 2008 01:22:00 +0000 (02:22 +0100)
js/irc/baseircclient.js
js/irc/ircclient.js
js/irc/numerics.js
js/ui/theme.js

index 720770faaae0b96b3cc9fffa9f4bf7cac876b0da..f61c4f9ef0421957a7d76a2757d15d5494064b44 100644 (file)
@@ -371,6 +371,11 @@ qwebirc.irc.BaseIRCClient = new Class({
     
     return this.whois(nick, "end", {});
   },
+  irc_ERR_NOSUCHNICK: function(prefix, params) {
+    var nick = params[1];
+    
+    return this.whois(nick, "nosuchnick", {});
+  },
   irc_RPL_AWAY: function(prefix, params) {
     var nick = params[1];
     var text = params.indexFromEnd(-1);
index 61bc92f60fa5c9b7c6c063ad377b64bb5eccdd57..ce8400029d6fc90634c60b2e2efa07ff095827c6 100644 (file)
@@ -415,6 +415,8 @@ qwebirc.irc.IRCClient = new Class({
       ndata.x = data.ip;
     } else if(type == "end") {
       mtype = "END";
+    } else if(type == "nosuchnick") {
+      mtype = "NOSUCHNICK";
     } else {
       return false;
     }
index a283e3a43577f938b49d31c20c76dfbc352b6a9b..a900d773ece76b8fc8792a11ab8f27d9f57b50a3 100644 (file)
@@ -17,5 +17,6 @@ qwebirc.irc.Numerics = {
   "330": "RPL_WHOISACCOUNT",
   "338": "RPL_WHOISACTUALLY",
   "343": "RPL_WHOISOPERNAME",
-  "301": "RPL_AWAY"
+  "301": "RPL_AWAY",
+  "401": "ERR_NOSUCHNICK"
 };
index 6e90b77e020bd1958dc7e8a63247765e558a13de..d0a4ed0c0b2296fff2a037f985bb5711265e44d3 100644 (file)
@@ -55,7 +55,8 @@ qwebirc.ui.themes.Default = {
   "WHOISOPERNAME": [" operedas : $m", true],
   "WHOISACTUALLY": [" realhost : $m [ip: $x]", true],
   "WHOISEND": ["End of WHOIS", true],
-  "AWAY": ["$n is away: $m", true]
+  "AWAY": ["$n is away: $m", true],
+  "WHOISNOSUCHNICK": ["No such nick: $n", true]
 };
 
 qwebirc.ui.Theme = new Class({