From ba21099ba8ea468fefc98cb527a975e4698899cf Mon Sep 17 00:00:00 2001 From: Darren Date: Fri, 25 Jan 2013 19:06:22 +0000 Subject: [PATCH] IrcEventBinder refactor --- server/irc/eventbinder.js | 9 ++------- 1 file changed, 2 insertions(+), 7 deletions(-) diff --git a/server/irc/eventbinder.js b/server/irc/eventbinder.js index 0f4fe8d..f343913 100644 --- a/server/irc/eventbinder.js +++ b/server/irc/eventbinder.js @@ -1,12 +1,7 @@ var _ = require('lodash'); -var IrcEventBinder = function () {}; -module.exports = IrcEvents; - - - -IrcEvents.prototype.bindIrcEvents = function (events_scope, event_map, context, irc_connection) { +module.exports.bindIrcEvents = function (events_scope, event_map, context, irc_connection) { _.each(event_map, function (fn, event_name) { // Bind the event to `context`, storing it with the event listing if (!event_map[event_name].bound_fn) { @@ -19,7 +14,7 @@ IrcEvents.prototype.bindIrcEvents = function (events_scope, event_map, context, }; -IrcEvents.prototype.unbindIrcEvents = function (events_scope, event_map, irc_connection) { +module.exports.unbindIrcEvents = function (events_scope, event_map, irc_connection) { _.each(event_map, function(fn, event_name) { if (event_map[event_name].bound_fn) { // Remove the listener from the IRC connection object -- 2.25.1