From 87760f7bd47ebe61414616e0bc5982222b7e4004 Mon Sep 17 00:00:00 2001 From: Luke Slater Date: Mon, 24 Oct 2011 13:51:02 +0100 Subject: [PATCH] right chnnale --- modules/modehate.js | 5 ++--- run.js | 8 +++----- 2 files changed, 5 insertions(+), 8 deletions(-) diff --git a/modules/modehate.js b/modules/modehate.js index 6fec54d..f2cb39e 100644 --- a/modules/modehate.js +++ b/modules/modehate.js @@ -3,11 +3,10 @@ var modehate = function(dbot) { return { 'listener': function(data, params) { - // TODO clean this shit up ffs if(data.raw[0].indexOf('-oooo') != -1) { - dbot.instance.send('KICK #42 ' + data.user + ' :gtfo - mass deop protection'); + dbot.instance.send('KICK ' + data.channel + ' ' + data.user + ' :gtfo - mass deop protection'); } else if(dbot.db.modehate.include(data.user) && data.raw[0].indexOf('-o') != -1) { - dbot.instance.send('KICK #42 ' + data.user + ' :gtfo'); + dbot.instance.send('KICK ' + data.channel ' ' + data.user + ' :gtfo'); } }, diff --git a/run.js b/run.js index 92be0b6..fd66cbe 100644 --- a/run.js +++ b/run.js @@ -3,7 +3,7 @@ var timers = require('./timer'); var jsbot = require('./jsbot'); require('./snippets'); -var modules = ['modehate', 'user', 'web', 'admin', 'puns', 'kick', 'karma', 'youare', 'quotes']; +var modules = ['modehate', 'user', 'admin', 'puns', 'kick', 'karma', 'youare', 'quotes']; var DBot = function(dModules, timers) { this.admin = 'reality'; @@ -12,10 +12,8 @@ var DBot = function(dModules, timers) { this.db = JSON.parse(fs.readFileSync('db.json', 'utf-8')); this.timers = timers.create(); - this.instance = jsbot.createJSBot(this.name, 'irc.aberwiki.org', 6667, this, function() { - this.instance.join('#42'); - this.instance.join('#itonlygetsworse'); - this.instance.join('#not42'); + this.instance = jsbot.createJSBot(this.name, 'irc.freenode.net', 6667, this, function() { + this.instance.join('#tdtrs'); }.bind(this)); this.moduleNames = dModules;