From 1dad9adf52db07b5b38139f21b78b490cd277c78 Mon Sep 17 00:00:00 2001 From: Randy Jimenez Date: Sun, 6 Apr 2014 19:57:05 -0400 Subject: [PATCH] Fixed a bug where CANNOTSENDTOCHAN misfired its bug and add a feature to where cannot_send_to_chan is mentioned in the client --- client/src/models/network.js | 3 +++ server/irc/commands.js | 2 +- server/irc/server.js | 2 +- 3 files changed, 5 insertions(+), 2 deletions(-) diff --git a/client/src/models/network.js b/client/src/models/network.js index 192e8ef..1d5a073 100644 --- a/client/src/models/network.js +++ b/client/src/models/network.js @@ -822,6 +822,9 @@ panel.addMsg(' ', '== ' + event.reason, 'status'); _kiwi.app.message.text(event.reason + ' (' + event.channel + ')'); break; + case 'cannot_send_to_channel': + panel.addMsg(' ', '== ' + _kiwi.global.i18n.translate('Cannot send message to channel, you are not voiced').fetch(event.channel, event.reason), 'status'); + break; case 'no_such_nick': tmp = this.panels.getByName(event.nick); if (tmp) { diff --git a/server/irc/commands.js b/server/irc/commands.js index 96927dc..30919bc 100644 --- a/server/irc/commands.js +++ b/server/irc/commands.js @@ -792,7 +792,7 @@ handlers = { }, ERR_CANNOTSENDTOCHAN: function (command) { - this.irc_connection.emit('server ' + this.irc_connection.irc_host.hostname + ' cannot_send_to_chan', { + this.irc_connection.emit('server ' + this.irc_connection.irc_host.hostname + ' cannot_send_to_channel', { channel: command.params[1], reason: command.params[command.params.length - 1] }); diff --git a/server/irc/server.js b/server/irc/server.js index d1fc353..2e42fab 100755 --- a/server/irc/server.js +++ b/server/irc/server.js @@ -152,7 +152,7 @@ function onNoSuchNick(event) { function onCannotSendToChan(event) { this.irc_connection.clientEvent('irc_error', { - error: 'cannot_send_to_chan', + error: 'cannot_send_to_channel', channel: event.channel, reason: event.reason }); -- 2.25.1