Skip to content

Commit

Permalink
Provide a restart function for the console mode
Browse files Browse the repository at this point in the history
  • Loading branch information
robarnold committed Jun 4, 2011
1 parent 5ca7418 commit 1dac981
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions bot.js
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,10 @@ var mode = 'irc';
if (process.argv.length > 2)
mode = process.argv[2];
if (mode === 'console') {
updater.restart = function () {
console.log("It's less awkward if I just exit");
process.exit()
}
// Console channel
var consoleChannel = channels.add('<console>', console.log);
process.stdin.resume();
Expand Down

0 comments on commit 1dac981

Please sign in to comment.