}\r
\r
_.extend(this, Backbone.Events);\r
+ this._source = event_source;\r
\r
// Proxy the events to this dispatcher\r
event_source.on('all', proxyEvent, this);\r
this.dispose = function () {\r
event_source.off('all', proxyEvent);\r
this.off();\r
+ delete this.event_source;\r
};\r
},\r
\r
var funcs = {\r
kiwi: 'kiwi', raw: 'raw', kick: 'kick', topic: 'topic',\r
part: 'part', join: 'join', action: 'action', ctcp: 'ctcp',\r
- notice: 'notice', msg: 'privmsg'\r
+ notice: 'notice', msg: 'privmsg',\r
+ get: 'get'\r
};\r
\r
_.each(funcs, function(gateway_fn, func_name) {\r
obj[func_name] = function() {\r
var fn_name = gateway_fn;\r
- _kiwi.gateway[fn_name].apply(_kiwi.gateway, arguments);\r
+ return _kiwi.gateway[fn_name].apply(_kiwi.gateway, arguments);\r
};\r
});\r
\r
};\r
\r
_.each(funcs, function(controlbox_fn, func_name) {\r
- obj[func_name] = _kiwi.app.controlbox[controlbox_fn];\r
+ obj[func_name] = function() {\r
+ var fn_name = controlbox_fn;\r
+ return _kiwi.app.controlbox[fn_name].apply(_kiwi.app.controlbox, arguments);\r
+ };\r
});\r
\r
return obj;\r