From df4c7a0e2412ed09d760ecfc1ca476a13d729cd2 Mon Sep 17 00:00:00 2001 From: Luke Slater Date: Mon, 22 Aug 2011 19:43:16 +0100 Subject: [PATCH] moved snippets out --- run.js | 12 ++++-------- snippets.js | 3 +++ 2 files changed, 7 insertions(+), 8 deletions(-) create mode 100644 snippets.js diff --git a/run.js b/run.js index dad8f79..71815e3 100644 --- a/run.js +++ b/run.js @@ -1,3 +1,4 @@ +require('./snippets'); var fs = require('fs'); var jsbot = require('./jsbot'); var quote = require('./quotes'); @@ -8,14 +9,6 @@ var kick = require('./kick'); var reality = require('./reality'); var karma = require('./karma'); -/////////////////////////// - -Array.prototype.random = function() { - return this[Math.floor((Math.random()*this.length))]; -}; - -/////////////////////////// - var dbot = Class.create({ initialize: function(dModules, quotes) { this.admin = 'reality'; @@ -26,6 +19,9 @@ var dbot = Class.create({ this.instance = jsbot.createJSBot(this.name, 'elara.ivixor.net', 6667, this, function() { this.instance.join('#realitest'); + this.instance.join('#42'); + this.instance.join('#fail'); + this.instance.join('#itonlygetsworse'); }.bind(this)); this.modules = dModules.collect(function(n) { diff --git a/snippets.js b/snippets.js new file mode 100644 index 0000000..d69c6d5 --- /dev/null +++ b/snippets.js @@ -0,0 +1,3 @@ +Array.prototype.random = function() { + return this[Math.floor((Math.random()*this.length))]; +};