3
0
mirror of https://github.com/reality/dbot.git synced 2024-12-28 05:32:50 +01:00

moved snippets out

This commit is contained in:
Luke Slater 2011-08-22 19:43:16 +01:00
parent b1cb45798f
commit df4c7a0e24
2 changed files with 7 additions and 8 deletions

12
run.js
View File

@ -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) {

3
snippets.js Normal file
View File

@ -0,0 +1,3 @@
Array.prototype.random = function() {
return this[Math.floor((Math.random()*this.length))];
};