this.on('onmsg', function (event) {\r
var source,\r
connection = _kiwi.app.connections.getByConnectionId(event.server),\r
- is_pm = (event.channel == connection.get('nick'));\r
+ is_pm = (event.channel.toLowerCase() == connection.get('nick').toLowerCase());\r
\r
source = is_pm ? event.nick : event.channel;\r
\r
this.on('onaction', function (event) {\r
var source,\r
connection = _kiwi.app.connections.getByConnectionId(event.server),\r
- is_pm = (event.channel == connection.get('nick'));\r
+ is_pm = (event.channel.toLowerCase() == connection.get('nick').toLowerCase());\r
\r
source = is_pm ? event.nick : event.channel;\r
\r
function onMsg(event) {
var panel,
- is_pm = (event.channel == this.get('nick'));
+ is_pm = (event.channel.toLowerCase() == this.get('nick').toLowerCase());
// An ignored user? don't do anything with it
if (_kiwi.gateway.isNickIgnored(event.nick)) {
function onAction(event) {
var panel,
- is_pm = (event.channel == this.get('nick'));
+ is_pm = (event.channel.toLowerCase() == this.get('nick').toLowerCase());
// An ignored user? don't do anything with it
if (_kiwi.gateway.isNickIgnored(event.nick)) {
if ((command.trailing.charAt(0) === String.fromCharCode(1)) && (command.trailing.charAt(command.trailing.length - 1) === String.fromCharCode(1))) {
// It's a CTCP response
- namespace = (command.params[0] == this.irc_connection.nick) ? 'user' : 'channel';
+ namespace = (command.params[0].toLowerCase() == this.irc_connection.nick.toLowerCase()) ? 'user' : 'channel';
this.irc_connection.emit(namespace + ' ' + command.params[0] + ' ctcp_response', {
nick: command.nick,
ident: command.ident,
msg: command.trailing.substr(1, command.trailing.length - 2)
});
} else {
- namespace = (command.params[0] == this.irc_connection.nick || command.params[0] == '*') ?
+ namespace = (command.params[0].toLowerCase() == this.irc_connection.nick.toLowerCase() || command.params[0] == '*') ?
'user' :
'channel';
}
} else {
// A message to a user (private message) or to a channel?
- namespace = (command.params[0] === this.irc_connection.nick) ? 'user ' + command.nick : 'channel ' + command.params[0];
+ namespace = (command.params[0].toLowerCase() == this.irc_connection.nick.toLowerCase()) ? 'user ' + command.nick : 'channel ' + command.params[0];
this.irc_connection.emit(namespace + ' privmsg', {
nick: command.nick,
ident: command.ident,
msg: msg,
numeric: parseInt(command.command, 10)
});
-}
\ No newline at end of file
+}