mirror of
https://github.com/reality/dbot.git
synced 2024-12-24 03:33:07 +01:00
Fixed some regex, fixed the admin module etc. Small changes.
This commit is contained in:
parent
c5c37334f1
commit
98e66a3086
@ -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 {
|
||||
|
@ -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) {
|
||||
|
5
run.js
5
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();
|
||||
};
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user