From 68dd5a3bf095ec11c0d01ab5de7938c920ab5825 Mon Sep 17 00:00:00 2001 From: Darren Date: Thu, 18 Jul 2013 18:32:11 +0100 Subject: [PATCH] Server: Moving events from the module prototype --- server/modules.js | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/server/modules.js b/server/modules.js index cfba650..08f17f5 100644 --- a/server/modules.js +++ b/server/modules.js @@ -35,7 +35,7 @@ function registerPublisher (obj) { */ // Hold the loaded modules -var registered_modules = {}; +var registered_modules = []; function loadModule (module_file) { var module, @@ -80,13 +80,13 @@ function unloadModule (module) { * To be created by modules to bind to server events */ function Module (module_name) { - registered_modules[module_name] = this; + registered_modules.push(this); this.module_name = module_name; -} + // Holder for all the bound events by this module + this._events = {}; +} -// Holder for all the bound events by this module -Module.prototype._events = {}; // Keep track of this modules events and bind -- 2.25.1