Server: Removed host+port duplication from IrcServer
authorDarren <darren@darrenwhitlen.com>
Fri, 1 Feb 2013 14:40:17 +0000 (14:40 +0000)
committerDarren <darren@darrenwhitlen.com>
Fri, 1 Feb 2013 14:40:17 +0000 (14:40 +0000)
server/irc/server.js

index d7498460d2c8adfb2a81ffb0ca81b6cf6ea744b2..412af8dd25e01ee659634f57b9a9c6c8b29af34c 100755 (executable)
@@ -2,10 +2,8 @@ var util    = require('util'),
     EventBinder  = require('./eventbinder.js'),
     _ = require('lodash');
 
-var IrcServer = function (irc_connection, host, port) {
+var IrcServer = function (irc_connection) {
     this.irc_connection = irc_connection;
-    this.host = host;
-    this.port = port;
 
     this.list_buffer = [];
     this.motd_buffer = '';
@@ -34,7 +32,7 @@ var IrcServer = function (irc_connection, host, port) {
         chanop_privs_needed:    onChanopPrivsNeeded,
         nickname_in_use:        onNicknameInUse
     };
-    EventBinder.bindIrcEvents('server:' + this.host, this.irc_events, this, this.irc_connection);
+    EventBinder.bindIrcEvents('server:*', this.irc_events, this, this.irc_connection);
     
 
 };
@@ -44,7 +42,7 @@ module.exports = IrcServer;
 
 
 IrcServer.prototype.dispose = function (){
-    EventBinder.unbindIrcEvents('server:' + this.host, this.irc_events, this.irc_connection);
+    EventBinder.unbindIrcEvents('server:*', this.irc_events, this.irc_connection);
     this.irc_connection = undefined;
 };