* Binds all of the event handlers to their events\r
*/\r
bindAll: function () {\r
- $(kiwi.gateway).bind("onmsg", this.onMsg);\r
- $(kiwi.gateway).bind("onnotice", this.onNotice);\r
- $(kiwi.gateway).bind("onaction", this.onAction);\r
- $(kiwi.gateway).bind("onmotd", this.onMOTD);\r
- $(kiwi.gateway).bind("onoptions", this.onOptions);\r
- $(kiwi.gateway).bind("onconnect", this.onConnect);\r
- $(kiwi.gateway).bind("onconnect_fail", this.onConnectFail);\r
- $(kiwi.gateway).bind("ondisconnect", this.onDisconnect);\r
- $(kiwi.gateway).bind("onreconnecting", this.onReconnecting);\r
- $(kiwi.gateway).bind("onnick", this.onNick);\r
- $(kiwi.gateway).bind("onuserlist", this.onUserList);\r
- $(kiwi.gateway).bind("onuserlist_end", this.onUserListEnd);\r
- $(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
- $(kiwi.gateway).bind("onkick", this.onKick);\r
- $(kiwi.gateway).bind("onquit", this.onQuit);\r
- $(kiwi.gateway).bind("onmode", this.onMode);\r
- $(kiwi.gateway).bind("onwhois", this.onWhois);\r
- $(kiwi.gateway).bind("onsync", this.onSync);\r
- $(kiwi.gateway).bind("onchannel_redirect", this.onChannelRedirect);\r
- $(kiwi.gateway).bind("ondebug", this.onDebug);\r
- $(kiwi.gateway).bind("onctcp_request", this.onCTCPRequest);\r
- $(kiwi.gateway).bind("onctcp_response", this.onCTCPResponse);\r
- $(kiwi.gateway).bind("onirc_error", this.onIRCError);\r
- $(kiwi.gateway).bind("onkiwi", this.onKiwi);\r
+ $(kiwi.gateway).bind('onmsg', this.onMsg)\r
+ .bind('onnotice', this.onNotice)\r
+ .bind('onaction', this.onAction)\r
+ .bind('onmotd', this.onMOTD)\r
+ .bind('onoptions', this.onOptions)\r
+ .bind('onconnect', this.onConnect)\r
+ .bind('onconnect_fail', this.onConnectFail)\r
+ .bind('ondisconnect', this.onDisconnect)\r
+ .bind('onreconnecting', this.onReconnecting)\r
+ .bind('onnick', this.onNick)\r
+ .bind('onuserlist', this.onUserList)\r
+ .bind('onuserlist_end', this.onUserListEnd)\r
+ .bind('onlist_start', this.onChannelListStart)\r
+ .bind('onlist_channel', this.onChannelList)\r
+ .bind('onlist_end', this.onChannelListEnd)\r
+ .bind('onbanlist', this.onBanList)\r
+ .bind('onbanlist_end', this.onBanListEnd)\r
+ .bind('onjoin', this.onJoin)\r
+ .bind('ontopic', this.onTopic)\r
+ .bind('ontopicsetby', this.onTopicSetBy)\r
+ .bind('onpart', this.onPart)\r
+ .bind('onkick', this.onKick)\r
+ .bind('onquit', this.onQuit)\r
+ .bind('onmode', this.onMode)\r
+ .bind('onwhois', this.onWhois)\r
+ .bind('onsync', this.onSync)\r
+ .bind('onchannel_redirect', this.onChannelRedirect)\r
+ .bind('ondebug', this.onDebug)\r
+ .bind('onctcp_request', this.onCTCPRequest)\r
+ .bind('onctcp_response', this.onCTCPResponse)\r
+ .bind('onirc_error', this.onIRCError)\r
+ .bind('onkiwi', this.onKiwi);\r
},\r
\r
/**\r
}\r
},\r
\r
+ /**\r
+ * Handles the topicsetby event\r
+ * @param {eventObject} e The event object\r
+ * @param {Object} data The event data\r
+ */\r
+ onTopicSetBy: function (e, data) {\r
+ var when, tab = Tabview.getTab(data.channel);\r
+ if (tab) {\r
+ when = new Date(data.when*1000).toLocaleString();\r
+ tab.addMsg(null, '', 'Topic set by ' + data.nick + ' at ' + when, 'topic');\r
+ }\r
+ },\r
+\r
/**\r
* Handles the notice event\r
* @param {eventObject} e The event object\r