From: KiwiIRC Date: Sat, 12 Apr 2014 23:02:30 +0000 (+0200) Subject: Added inspircd 310 RPL_WHOISHELPOP and 335 RPL_WHOISBOT numerics X-Git-Url: https://vcs.fsf.org/?a=commitdiff_plain;h=951cd81e99bc8c8d46e0126f722f7adffac83cc6;p=KiwiIRC.git Added inspircd 310 RPL_WHOISHELPOP and 335 RPL_WHOISBOT numerics --- diff --git a/server/irc/commands.js b/server/irc/commands.js index 96927dc..bdf2038 100644 --- a/server/irc/commands.js +++ b/server/irc/commands.js @@ -20,6 +20,7 @@ irc_numerics = { '266': 'RPL_GLOBALUSERS', '301': 'RPL_AWAY', '307': 'RPL_WHOISREGNICK', + '310': 'RPL_WHOIHELPOP', '311': 'RPL_WHOISUSER', '312': 'RPL_WHOISSERVER', '313': 'RPL_WHOISOPERATOR', @@ -38,6 +39,7 @@ irc_numerics = { '331': 'RPL_NOTOPIC', '332': 'RPL_TOPIC', '333': 'RPL_TOPICWHOTIME', + '335': 'RPL_WHOISBOT', '341': 'RPL_INVITING', '352': 'RPL_WHOREPLY', '353': 'RPL_NAMEREPLY', @@ -184,6 +186,20 @@ handlers = { }); }, + 'RPL_WHOISHELPOP': function (command) { + this.irc_connection.emit('user ' + command.params[1] + ' whoishelpop', { + nick: command.params[1], + msg: command.params[command.params.length - 1] + }); + }, + + 'RPL_WHOISBOT': function (command) { + this.irc_connection.emit('user ' + command.params[1] + ' whoisbot', { + nick: command.params[1], + msg: command.params[command.params.length - 1] + }); + }, + 'RPL_WHOISSERVER': function (command) { this.irc_connection.emit('user ' + command.params[1] + ' whoisserver', { nick: command.params[1], diff --git a/server/irc/user.js b/server/irc/user.js index 67303e6..4814828 100755 --- a/server/irc/user.js +++ b/server/irc/user.js @@ -20,6 +20,8 @@ var IrcUser = function (irc_connection, nick) { whoishost: onWhoisHost, whoissecure: onWhoisSecure, whoisaccount: onWhoisAccount, + whoishelpop: onWhoisHelpOp, + whoisbot: onWhoisBot, endofwhois: onWhoisEnd, whowas: onWhoWas, endofwhowas: onWhoWasEnd, @@ -168,6 +170,22 @@ function onWhoisAccount(event) { }); } +function onWhoisHelpOp(event) { + this.irc_connection.clientEvent('whois', { + nick: event.nick, + msg: event.msg, + end: false + }); +} + +function onWhoisBot(event) { + this.irc_connection.clientEvent('whois', { + nick: event.nick, + msg: event.msg, + end: false + }); +} + function onWhoisEnd(event) { this.irc_connection.clientEvent('whois', { nick: event.nick,