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,