Moved modules to a subdirectory.

This commit is contained in:
Luke Slater 2011-08-22 22:17:13 +01:00
parent 013908d6b2
commit d266f71c0e
8 changed files with 9 additions and 9 deletions

View File

@ -3,7 +3,7 @@ var adminCommands = function(dbot) {
var commands = {
'join': function(data, params) {
dbot.join(params[1]);
dbot.instance.join(params[1]);
dbot.say(dbot.admin, 'Joined ' + params[1]);
},

View File

@ -51,7 +51,7 @@ var userCommands = function(dbot) {
},
'~kickcount': function(data, params) {
if(dbot.db.kicks[params[1]] == undefined) {
if(dbot.db.kicks.hasOwnProperty(params[1])) {
dbot.say(data.channel, params[1] + ' has either never been kicked or does not exist.');
} else {
dbot.say(data.channel, params[1] + ' has been kicked ' + dbot.db.kicks[params[1]] + ' times.');

14
run.js
View File

@ -1,13 +1,13 @@
require('./snippets');
var fs = require('fs');
var jsbot = require('./jsbot');
var quote = require('./quotes');
var userCommands = require('./user');
var adminCommands = require('./admin');
var puns = require('./puns');
var kick = require('./kick');
var reality = require('./reality');
var karma = require('./karma');
var quote = require('./modules/quotes');
var userCommands = require('./modules/user');
var adminCommands = require('./modules/admin');
var puns = require('./modules/puns');
var kick = require('./modules/kick');
var reality = require('./modules/reality');
var karma = require('./modules/karma');
var dbot = Class.create({
initialize: function(dModules, quotes) {