mirror of
https://github.com/reality/dbot.git
synced 2024-12-28 13:42:36 +01:00
Merge git://github.com/reality/depressionbot
This commit is contained in:
commit
9fa5644a6b
@ -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();
|
||||
|
@ -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]);
|
||||
}
|
||||
}
|
||||
},
|
||||
|
@ -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")
|
||||
|
Loading…
Reference in New Issue
Block a user