diff --git a/modules/admin.js b/modules/admin.js index 70be12b..7ddc950 100644 --- a/modules/admin.js +++ b/modules/admin.js @@ -1,4 +1,6 @@ var fs = require('fs'); +var sys = require('sys') +var exec = require('child_process').exec; var adminCommands = function(dbot) { var dbot = dbot; @@ -17,6 +19,16 @@ var adminCommands = function(dbot) { dbot.instance.part(params[1]); }, + // Do a git pull and reload + 'greload': function(data, params) { + var child; + + child = exec("git pull", function (error, stdout, stderr) { + console.log(stderr); + commands.reload(data, params); + }.bind(this)); + }, + 'reload': function(data, params) { dbot.db = JSON.parse(fs.readFileSync('db.json', 'utf-8')); dbot.reloadModules(); diff --git a/modules/quotes.js b/modules/quotes.js index fbb17ee..491233c 100644 --- a/modules/quotes.js +++ b/modules/quotes.js @@ -12,7 +12,7 @@ var quotes = function(dbot) { if(quotes.hasOwnProperty(key)) { dbot.say(data.channel, q[1] + ': ' + dbot.interpolatedQuote(key)); } else { - dbot.say(data.channel, 'Nobody loves ' + q[1]); + dbot.say(data.channel, 'No one loves ' + q[1]); } } }, diff --git a/views/layout.jade b/views/layout.jade index 9fd0226..be03d24 100644 --- a/views/layout.jade +++ b/views/layout.jade @@ -7,7 +7,7 @@ html(lang='en') body div#page div#title - a(href='/') Depressionbot web interface + a(href='/') #{name} web interface div#main !{body} script(type="text/javascript", src="/script.js")