case 'channel_is_full':
front.tabviews.server.addMsg(null, ' ', '=== ' + data.channel + ' is full.', 'status');
break;
+ case 'chanop_privs_needed':
+ front.tabviews[data.channel].addMsg(null, ' ', '=== ' + data.reason, 'status');
+ break;
+ case 'no_such_nick':
+ front.tabviews.server.addMsg(null, ' ', '=== ' + data.nick + ': ' + data.reason, 'status');
+ break;
default:
front.tabviews.server.addMsg(null, ' ', '=== ' + data, 'status');
}
RPL_WHOISIDLE: '317',
RPL_ENDOFWHOIS: '318',
RPL_WHOISCHANNELS: '319',
+ RPL_NOTOPIC: '331',
RPL_TOPIC: '332',
RPL_NAMEREPLY: '353',
RPL_ENDOFNAMES: '366',
ERR_INVITEONLYCHAN: '473',
ERR_BANNEDFROMCHAN: '474',
ERR_BADCHANNELKEY: '475',
+ ERR_LINKCHANNEL: '470',
+ ERR_CHANOPRIVSNEEDED: '482',
RPL_STARTTLS: '670'
};
websocket.emit('message', {event: 'channel_redirect', from: params[1], to: params[2]});
break;
case ircNumerics.ERR_NOSUCHNICK:
- //TODO: shit
+ websocket.emit('message', {event: 'irc_error', error: 'no_suck_nick', nick: msg.params.split(" ")[1], reason: msg.trailing});
break;
case 'JOIN':
websocket.emit('message', {event: 'join', nick: msg.nick, ident: msg.ident, hostname: msg.hostname, channel: msg.trailing});
case ircNumerics.RPL_TOPIC:
websocket.emit('message', {event: 'topic', nick: '', channel: msg.params.split(" ")[1], topic: msg.trailing});
break;
+ case ircNumerics.RPL_NOTOPIC:
+ websocket.emit('message', {event: 'topic', nick: '', channel: msg.params.split(" ")[1], topic:''});
+ break;
case 'MODE':
opts = msg.params.split(" ");
params = {event: 'mode', nick: msg.nick};
case ircNumerics.ERR_BADCHANNELKEY:
websocket.emit('message', {event: 'irc_error', error: 'bad_channel_key', channel: msg.params.split(" ")[1], reason: msg.trailing});
break;
+ case ircNumerics.ERR_CHANOPRIVSNEEDED:
+ websocket.emit('message', {event: 'irc_error', error: 'chanop_privs_needed', channel: msg.params.split(" ")[1], reason: msg.trailing});
+ break;
}
} else {
console.log("Unknown command.\r\n");