//this.gateway.on('all', function() {console.log('ALL', this.get('connection_id'), arguments);});
this.gateway.on('connect', onConnect, this);
+ this.gateway.on('disconnect', onDisconnect, this);
this.gateway.on('nick', function(event) {
if (event.nick === this.get('nick')) {
});
+
+ function onDisconnect(event) {
+ $.each(this.panels.models, function (index, panel) {
+ panel.addMsg('', 'Disconnected from the IRC network', 'action quit');
+ });
+ }
+
+
function onConnect(event) {
var panels, channel_names;
});
con.on('close', function () {
+ // TODO: Can we get a better reason for the disconnection? Was it planned?
+ that.sendIrcCommand('disconnect', {server: con.con_num, reason: 'disconnected'});
+
that.irc_connections[con_num] = null;
global.servers.removeConnection(this);
});