bindEvent('ctcp_request', this.onCtcpRequest);
bindEvent('ctcp_response', this.onCtcpResponse);
+ bindEvent('topic', this.onTopic)
+
bindEvent('nicklist', this.onNicklist);
bindEvent('nicklistEnd', this.onNicklistEnd);
}
IrcChannel.prototype.onKick = function (event) {
this.client.sendIrcCommand('kick', {
- kicked: event.params[1], // Nick of the kicked
+ kicked: event.kicked, // Nick of the kicked
nick: event.nick, // Nick of the kicker
ident: event.ident,
hostname: event.hostname,
IrcChannel.prototype.onMsg = function (event) {
this.clientEvent('msg', {
- server: this.con_num,
nick: event.nick,
ident: event.ident,
hostname: event.hostname,
IrcChannel.prototype.onNotice = function (event) {
this.clientEvent('msg', {
- server: this.con_num,
nick: event.nick,
ident: event.ident,
hostname: event.hostname,
});
};
+
+IrcChannel.prototype.onTopic = function (event) {
+ this.clientEvent('topic', {
+ nick: event.nick,
+ channel: this.name,
+ topic: event.topic
+ });
+};
+
/*
server:event
server:*
var channel = command.params[0],
topic = command.trailing || '';
- this.client.sendIrcCommand('topic', {server: this.con_num, nick: command.nick, channel: channel, topic: topic});
+ this.irc_connection.emit('channel:' + channel + ':topic', {
+ nick: command.nick,
+ channel: channel,
+ topic: topic
+ });
},
'MODE': function (command) {
var chanmodes = this.irc_connection.options.CHANMODES || [],