Skip to content

Commit

Permalink
new config option: handle
Browse files Browse the repository at this point in the history
  • Loading branch information
arturadib committed Apr 17, 2012
1 parent 58c7e01 commit 86fac81
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 1 deletion.
1 change: 1 addition & 0 deletions bootstrap/config.json
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
{
"name": "Bot.io (Main)",
"handle": "botio",
"script_timeout": 3600,
"private_dir": "./private",
"public_dir": "./public",
Expand Down
3 changes: 2 additions & 1 deletion lib/server.js
Original file line number Diff line number Diff line change
Expand Up @@ -232,7 +232,8 @@ app.post('/', function(req, res) {
}

var commentBody = payload.comment.body,
match = commentBody.match(/^\/botio *(\w*)/m);
handle = config.handle || 'botio',
match = commentBody.match(new RegExp('/^\/'+handle+' *(\w*)/m'));

if (!match) {
debug('not a bot command, skipping comment:', payload.comment.url);
Expand Down

0 comments on commit 86fac81

Please sign in to comment.