From: Darren Date: Thu, 18 Jul 2013 17:32:11 +0000 (+0100) Subject: Server: Moving events from the module prototype X-Git-Url: https://vcs.fsf.org/?a=commitdiff_plain;h=68dd5a3bf095ec11c0d01ab5de7938c920ab5825;p=KiwiIRC.git Server: Moving events from the module prototype --- 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