this.on('onmsg', function (event) {\r
var source,\r
connection = _kiwi.app.connections.getByConnectionId(event.server),\r
- is_pm = (event.channel.toLowerCase() == connection.get('nick').toLowerCase());\r
+ is_pm = (event.target.toLowerCase() == connection.get('nick').toLowerCase());\r
\r
- source = is_pm ? event.nick : event.channel;\r
+ source = is_pm ? event.nick : event.target;\r
\r
that.trigger('message:' + source, event);\r
that.trigger('message', event);\r
this.on('onaction', function (event) {\r
var source,\r
connection = _kiwi.app.connections.getByConnectionId(event.server),\r
- is_pm = (event.channel.toLowerCase() == connection.get('nick').toLowerCase());\r
+ is_pm = (event.target.toLowerCase() == connection.get('nick').toLowerCase());\r
\r
- source = is_pm ? event.nick : event.channel;\r
+ source = is_pm ? event.nick : event.target;\r
\r
that.trigger('action:' + source, event);\r
\r
function onMsg(event) {
var panel,
- is_pm = (event.channel.toLowerCase() == this.get('nick').toLowerCase());
+ is_pm = (event.target.toLowerCase() == this.get('nick').toLowerCase());
// An ignored user? don't do anything with it
if (this.isNickIgnored(event.nick)) {
} else {
// If a panel isn't found for this channel, reroute to the
// server panel
- panel = this.panels.getByName(event.channel);
+ panel = this.panels.getByName(event.target);
if (!panel) {
panel = this.panels.server;
}
function onAction(event) {
var panel,
- is_pm = (event.channel.toLowerCase() == this.get('nick').toLowerCase());
+ is_pm = (event.target.toLowerCase() == this.get('nick').toLowerCase());
// An ignored user? don't do anything with it
if (this.isNickIgnored(event.nick)) {
} else {
// If a panel isn't found for this channel, reroute to the
// server panel
- panel = this.panels.getByName(event.channel);
+ panel = this.panels.getByName(event.target);
if (!panel) {
panel = this.panels.server;
}
nick: event.nick,
ident: event.ident,
hostname: event.hostname,
- channel: that.name,
+ target: that.name,
msg: event.msg,
time: event.time
});
nick: event.nick,
ident: event.ident,
hostname: event.hostname,
- channel: event.channel,
+ target: event.target,
msg: event.msg,
time: event.time
});
nick: command.nick,
ident: command.ident,
hostname: command.hostname,
- channel: command.params[0],
+ target: command.params[0],
msg: msg.substring(1, msg.length - 1),
time: time
});
nick: command.nick,
ident: command.ident,
hostname: command.hostname,
- channel: command.params[0],
+ target: command.params[0],
msg: msg.substring(8, msg.length - 1),
time: time
});
this.irc_connection.write('NOTICE ' + command.nick + ' :' + String.fromCharCode(1) + 'CLIENTINFO SOURCE VERSION TIME' + String.fromCharCode(1));
} else {
- namespace = (command.params[0].toLowerCase() === this.irc_connection.nick.toLowerCase()) ? 'user' : 'channel';
- this.irc_connection.emit(namespace + ' ' + command.nick + ' ctcp_request', {
+ namespace = (command.params[0].toLowerCase() === this.irc_connection.nick.toLowerCase()) ?
+ 'user ' + command.nick :
+ 'channel ' + command.params[0];
+
+ this.irc_connection.emit(namespace + ' ctcp_request', {
nick: command.nick,
ident: command.ident,
hostname: command.hostname,
nick: command.nick,
ident: command.ident,
hostname: command.hostname,
- channel: command.params[0],
+ target: command.params[0],
msg: msg,
time: time
});
nick: event.nick,\r
ident: event.ident,\r
hostname: event.hostname,\r
- channel: event.channel,\r
+ target: event.target,\r
msg: event.msg,\r
time: event.time\r
});\r
nick: event.nick,\r
ident: event.ident,\r
hostname: event.hostname,\r
- channel: event.channel,\r
+ target: event.target,\r
msg: event.msg,\r
time: event.time\r
});\r
nick: event.nick,\r
ident: event.ident,\r
hostname: event.hostname,\r
- channel: event.channel,\r
+ target: event.target,\r
msg: event.msg,\r
time: event.time\r
});\r