From 951cd81e99bc8c8d46e0126f722f7adffac83cc6 Mon Sep 17 00:00:00 2001 From: KiwiIRC Date: Sun, 13 Apr 2014 01:02:30 +0200 Subject: [PATCH] Added inspircd 310 RPL_WHOISHELPOP and 335 RPL_WHOISBOT numerics --- server/irc/commands.js | 16 ++++++++++++++++ server/irc/user.js | 18 ++++++++++++++++++ 2 files changed, 34 insertions(+) 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, -- 2.25.1