diff --git a/modules/admin.js b/modules/admin.js index 8cb4319..16cd18a 100644 --- a/modules/admin.js +++ b/modules/admin.js @@ -10,7 +10,7 @@ var adminCommands = function(dbot) { }, 'part': function(data, params) { - dbot.part(params[1]); + dbot.instance.part(params[1]); }, 'reload': function(data, params) { @@ -34,7 +34,7 @@ var adminCommands = function(dbot) { 'unload': function(data, params) { console.log(dbot.moduleNames); if(dbot.moduleNames.include(params[1])) { - dbot.moduleNames[params[1]] = undefined; + dbot.moduleNames[params[1]] = null; dbot.reloadModules(); dbot.say(data.channel, 'Turned off module: ' + params[1]); } else { diff --git a/modules/reality.js b/modules/reality.js index ed10975..22f953d 100644 --- a/modules/reality.js +++ b/modules/reality.js @@ -4,9 +4,9 @@ var reality = function(dbot) { return { 'listener': function(data, params) { if(data.user == 'reality') { - var once = data.message.match(/^I ([\d\w\s,]* once)/); + var once = data.message.match(/^I ([\d\w\s,'-]* once)/); } else { - var once = data.message.match(/^reality ([\d\w\s,]* once)/); + var once = data.message.match(/^reality ([\d\w\s,'-]* once)/); } if(once != null) { diff --git a/run.js b/run.js index 00f379e..3218685 100644 --- a/run.js +++ b/run.js @@ -14,15 +14,12 @@ var DBot = function(dModules, quotes) { this.instance = jsbot.createJSBot(this.name, 'elara.ivixor.net', 6667, this, function() { this.instance.join('#realitest'); this.instance.join('#42'); + this.instance.join('#fail'); this.instance.join('#itonlygetsworse'); }.bind(this)); this.moduleNames = dModules; - this.rawModules = []; - this.modules = []; - this.reloadModules(); - this.instance.connect(); };