ERR_NICKNAMEINUSE: '433',
ERR_USERNOTINCHANNEL: '441',
ERR_NOTONCHANNEL: '442',
+ ERR_PASSWDMISMATCH: '464',
ERR_NOTREGISTERED: '451',
ERR_LINKCHANNEL: '470',
ERR_CHANNELISFULL: '471',
reason: command.trailing
});
},
+ ERR_PASSWDMISMATCH: function (command) {
+ this.irc_connection.emit('server:' + this.irc_connection.irc_host.hostname + ':password_mismatch', {});
+ },
ERR_LINKCHANNEL: function (command) {
this.irc_connection.emit('server:' + this.irc_connection.irc_host.hostname + ':channel_redirect', {
from: command.params[1],
});
this.irc_users = null;
this.irc_channels = null;
+ this.irc_users = undefined;
+ this.irc_channels = undefined;
+
+ this.server.dispose();
+ this.server = undefined;
EventBinder.unbindIrcEvents('', this.irc_events, this);
motd_start: onMotdStart,
motd: onMotd,
motd_end: onMotdEnd,
- error: onError,
+ error: onError_,
+ password_mismatch: onPasswordMismatch,
channel_redirect: onChannelRedirect,
no_such_nick: onNoSuchNick,
cannot_send_to_channel: onCannotSendToChan,
chanop_privs_needed: onChanopPrivsNeeded,
nickname_in_use: onNicknameInUse
};
- EventBinder.bindIrcEvents('server:' + this.host, this.irc_events, this, irc_connection);
+ EventBinder.bindIrcEvents('server:' + this.host, this.irc_events, this, this.irc_connection);
};
IrcServer.prototype.dispose = function (){
- EventBinder.unbindIrcEvents('server:' + this.host, this.irc_events);
+ EventBinder.unbindIrcEvents('server:' + this.host, this.irc_events, this.irc_connection);
this.irc_connection = undefined;
};
});
};
-function onError(event) {
+function onError_(event) {
this.irc_connection.clientEvent('irc_error', {
error: 'error',
reason: event.reason
});
};
+function onPasswordMismatch(event) {
+ this.irc_connection.clientEvent('irc_error', {
+ error: 'password_mismatch'
+ });
+}
+
function onChannelRedirect(event) {
this.irc_connection.clientEvent('channel_redirect', {
from: event.from,