EventEmitter2.call(this,{
wildcard: true,
- delimiter: ':'
+ delimiter: ' '
});
this.setMaxListeners(0);
this.applyIrcEvents();
// Call any modules before making the connection
- global.modules.emit('irc:connecting', {connection: this})
+ global.modules.emit('irc connecting', {connection: this})
.done(function () {
that.connect();
});
IrcConnection.prototype.applyIrcEvents = function () {
// Listen for events on the IRC connection
this.irc_events = {
- 'server:*:connect': onServerConnect,
- 'channel:*:join': onChannelJoin,
+ 'server * connect': onServerConnect,
+ 'channel * join': onChannelJoin,
// TODO: uncomment when using an IrcUser per nick
//'user:*:privmsg': onUserPrivmsg,
- 'user:*:nick': onUserNick,
- 'channel:*:part': onUserParts,
- 'channel:*:quit': onUserParts,
- 'channel:*:kick': onUserKick
+ 'user * nick': onUserNick,
+ 'channel * part': onUserParts,
+ 'channel * quit': onUserParts,
+ 'channel * kick': onUserKick
};
EventBinder.bindIrcEvents('', this.irc_events, this, this);
// Let the webirc/etc detection modify any required parameters
connect_data = findWebIrc.call(this, connect_data);
- global.modules.emit('irc:authorize', connect_data).done(function () {
+ global.modules.emit('irc authorize', connect_data).done(function () {
// Send any initial data for webirc/etc
if (connect_data.prepend_data) {
_.each(connect_data.prepend_data, function(data) {