$(kiwi.gateway).bind("onlist_start", this.onChannelListStart);\r
$(kiwi.gateway).bind("onlist_channel", this.onChannelList);\r
$(kiwi.gateway).bind("onlist_end", this.onChannelListEnd);\r
+ $(kiwi.gateway).bind("banlist", this.onBanList);\r
+ $(kiwi.gateway).bind("banlist_end", this.onBanListEnd);\r
$(kiwi.gateway).bind("onjoin", this.onJoin);\r
$(kiwi.gateway).bind("ontopic", this.onTopic);\r
$(kiwi.gateway).bind("onpart", this.onPart);\r
}\r
};\r
\r
- // TODO: convert seconds to mins:secs\r
secs = Math.floor(data.delay / 1000);\r
mins = Math.floor(secs / 60);\r
secs = secs % 60;\r
kiwi.front.cache.list.tab.show();\r
},\r
\r
+ onBanList: function (e, data) {\r
+ },\r
+\r
+ onBanListEnd: function (e, data) {\r
+ },\r
\r
onJoin: function (e, data) {\r
var tab = Tabview.getTab(data.channel);\r
};
// Static functions
Tabview.tabExists = function (name) {
+ if ((!name) || (typeof name !== 'string')) {
+ return false;
+ }
var ret = (typeof kiwi.front.tabviews[name.toLowerCase()] !== 'undefined');
return ret;
};
RPL_TOPIC: '332',
RPL_NAMEREPLY: '353',
RPL_ENDOFNAMES: '366',
+ RPL_BANLIST: '367',
+ RPL_ENDOFBANLIST: '368',
RPL_MOTD: '372',
RPL_WHOISMODES: '379',
ERR_NOSUCHNICK: '401',
case ircNumerics.ERR_NOSUCHNICK:
websocket.sendClientEvent('irc_error', {error: 'no_such_nick', nick: msg.params.split(" ")[1], reason: msg.trailing});
break;
+ case ircNumerics.RPL_BANLIST:
+ params = msg.params.split(" ");
+ console.log(params);
+ websocket.sendClientEvent('banlist', {server: '', channel: params[1], banned: params[2], banned_by: params[3], banned_at: params[4]});
+ break;
+ case ircNumerics.RPL_ENDOFBANLIST:
+ websocket.sendClientEvent('banlist_end', {server: '', channel: msg.params.split(" ")[1]});
+ break;
case 'JOIN':
// Some BNC's send malformed JOIN causing the channel to be as a
// parameter instead of trailing.