From c7fcb9fe1805c474eef8e64ee01713d389d3cff6 Mon Sep 17 00:00:00 2001 From: Luke Slater Date: Sat, 10 Mar 2012 17:51:24 +0000 Subject: [PATCH 1/5] do that in heading instead of just title --- views/layout.jade | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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") From d4320bbde78ccf179d21df42428144cf169f473b Mon Sep 17 00:00:00 2001 From: Luke Slater Date: Sat, 10 Mar 2012 17:56:38 +0000 Subject: [PATCH 2/5] greload command to git pull then reload --- modules/admin.js | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/modules/admin.js b/modules/admin.js index 70be12b..6395fb5 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,15 @@ var adminCommands = function(dbot) { dbot.instance.part(params[1]); }, + // Do a git pull and reload + 'greload': function(data, params) { + var child; + + child = exec("cd ../ && git pull", function (error, stdout, stderr) { + commands.reload(data, params); + }.bind(this)); + }, + 'reload': function(data, params) { dbot.db = JSON.parse(fs.readFileSync('db.json', 'utf-8')); dbot.reloadModules(); From b3a6aa2322a27c05818b89b9cd225c092c1d52b5 Mon Sep 17 00:00:00 2001 From: Luke Slater Date: Sat, 10 Mar 2012 17:57:34 +0000 Subject: [PATCH 3/5] test change for greload :| --- modules/quotes.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/modules/quotes.js b/modules/quotes.js index bb583db..5353fd8 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]); } } }, From ae28db6e702b0f5b8b96032693ce9aef3055c4ee Mon Sep 17 00:00:00 2001 From: Luke Slater Date: Sat, 10 Mar 2012 17:58:57 +0000 Subject: [PATCH 4/5] print output of greload --- modules/admin.js | 1 + 1 file changed, 1 insertion(+) diff --git a/modules/admin.js b/modules/admin.js index 6395fb5..d7af0c8 100644 --- a/modules/admin.js +++ b/modules/admin.js @@ -24,6 +24,7 @@ var adminCommands = function(dbot) { var child; child = exec("cd ../ && git pull", function (error, stdout, stderr) { + console.log(stdout); commands.reload(data, params); }.bind(this)); }, From 90866a095d97abeb074cac5fa6322c61ae45ffd4 Mon Sep 17 00:00:00 2001 From: Luke Slater Date: Sat, 10 Mar 2012 18:00:16 +0000 Subject: [PATCH 5/5] stderr? --- modules/admin.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/modules/admin.js b/modules/admin.js index d7af0c8..7ddc950 100644 --- a/modules/admin.js +++ b/modules/admin.js @@ -23,8 +23,8 @@ var adminCommands = function(dbot) { 'greload': function(data, params) { var child; - child = exec("cd ../ && git pull", function (error, stdout, stderr) { - console.log(stdout); + child = exec("git pull", function (error, stdout, stderr) { + console.log(stderr); commands.reload(data, params); }.bind(this)); },