Fixed a bug where CANNOTSENDTOCHAN misfired its bug and add a feature to where cannot...
authorRandy Jimenez <randy@randy-ubuntu.(none)>
Sun, 6 Apr 2014 23:57:05 +0000 (19:57 -0400)
committerRandy Jimenez <randy@randy-ubuntu.(none)>
Sun, 6 Apr 2014 23:57:05 +0000 (19:57 -0400)
client/src/models/network.js
server/irc/commands.js
server/irc/server.js

index 192e8efd5cdbaa437dc57e29a25d7f30bfd8366f..1d5a073ad0d8932da6d2830c2806156469e73206 100644 (file)
             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) {
index 96927dcbb72bba62820e9e197d54f6c0ffb91862..30919bc71dab2a180209d5e20a74444d803ab2da 100644 (file)
@@ -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]
         });
index d1fc35360b40a6c2a2b18f94ac84b7c1c75271f2..2e42fab6730c9dadee29365e87ab8d0c6b57a1a7 100755 (executable)
@@ -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
     });