From: Cory Chaplin Date: Tue, 20 May 2014 20:57:05 +0000 (+0200) Subject: Another improvement to Wallops, and a bunch of new raws X-Git-Url: https://vcs.fsf.org/?a=commitdiff_plain;h=8d192fd21b3c0a7937b4a853130323163890826b;p=KiwiIRC.git Another improvement to Wallops, and a bunch of new raws --- diff --git a/client/src/models/network.js b/client/src/models/network.js index 3247d82..1f351ae 100644 --- a/client/src/models/network.js +++ b/client/src/models/network.js @@ -872,19 +872,11 @@ function onWallops(event) { - var panel, active_panel; - - panel = this.panels.server; - - panel.addMsg('[' + (event.nick||'') + ']', styleText('wallops', {text: event.msg}), 'wallops', {time: event.time}); - - // Show wallops to the active panel if it's channel or query window - active_panel = _kiwi.app.panels().active; - - if (active_panel !== panel) { - if (active_panel.isChannel() || active_panel.isQuery()) + // Send to server panel + this.panels.server.addMsg('[' + (event.nick||'') + ']', styleText('wallops', {text: event.msg}), 'wallops', {time: event.time}); + // Send to active panel + if (_kiwi.app.panels().active !== this.panels.server) _kiwi.app.panels().active.addMsg('[' + (event.nick||'') + ']', styleText('wallops', {text: event.msg}), 'wallops', {time: event.time}); - } } } diff --git a/server/irc/commands.js b/server/irc/commands.js index a6db28b..20cb1d1 100644 --- a/server/irc/commands.js +++ b/server/irc/commands.js @@ -131,11 +131,16 @@ irc_numerics = { '464': 'ERR_PASSWDMISMATCH', '470': 'ERR_LINKCHANNEL', '471': 'ERR_CHANNELISFULL', + '472': 'ERR_UNKNOWNMODE', '473': 'ERR_INVITEONLYCHAN', '474': 'ERR_BANNEDFROMCHAN', '475': 'ERR_BADCHANNELKEY', '481': 'ERR_NOPRIVILEGES', '482': 'ERR_CHANOPRIVSNEEDED', + '483': 'ERR_CANTKILLSERVER', + '484': 'ERR_ISCHANSERVICE', + '485': 'ERR_ISREALSERVICE', + '491': 'ERR_NOOPERHOST', '670': 'RPL_STARTTLS', '671': 'RPL_WHOISSECURE', '900': 'RPL_SASLAUTHENTICATED', @@ -143,6 +148,7 @@ irc_numerics = { '904': 'ERR_SASLNOTAUTHORISED', '906': 'ERR_SASLABORTED', '907': 'ERR_SASLALREADYAUTHED', + '972': 'ERR_CANNOTDOCOMMAND', 'WALLOPS': 'RPL_WALLOPS' }; @@ -1425,6 +1431,41 @@ handlers = { msg: command.params[command.params.length - 1] }); }, + + ERR_NOOPERHOST: function (command) { + var params = _.clone(command.params); + params.shift(); + genericNotice.call(this, command, params.slice(0, -1).join(', ') + ' ' + command.params[command.params.length - 1]); + }, + + ERR_UNKNOWNMODE: function (command) { + var params = _.clone(command.params); + params.shift(); + genericNotice.call(this, command, params.slice(0, -1).join(', ') + ' ' + command.params[command.params.length - 1]); + }, + + ERR_CANTKILLSERVER: function (command) { + var params = _.clone(command.params); + params.shift(); + genericNotice.call(this, command, params.slice(0, -1).join(', ') + ' ' + command.params[command.params.length - 1]); + }, + + ERR_ISCHANSERVICE: function (command) { + var params = _.clone(command.params); + params.shift(); + genericNotice.call(this, command, params.slice(0, -1).join(', ') + ' ' + command.params[command.params.length - 1]); + }, + + ERR_ISREALSERVICE: function (command) { + var params = _.clone(command.params); + params.shift(); + genericNotice.call(this, command, params.slice(0, -1).join(', ') + ' ' + command.params[command.params.length - 1]); + }, + ERR_CANNOTDOCOMMAND: function (command) { + var params = _.clone(command.params); + params.shift(); + genericNotice.call(this, command, params.slice(0, -1).join(', ') + ' ' + command.params[command.params.length - 1]); + }, };