forked from GitHub/dbot
right chnnale
This commit is contained in:
parent
21bd3640ba
commit
87760f7bd4
@ -3,11 +3,10 @@ var modehate = function(dbot) {
|
|||||||
|
|
||||||
return {
|
return {
|
||||||
'listener': function(data, params) {
|
'listener': function(data, params) {
|
||||||
// TODO clean this shit up ffs
|
|
||||||
if(data.raw[0].indexOf('-oooo') != -1) {
|
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) {
|
} 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');
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
|
||||||
|
8
run.js
8
run.js
@ -3,7 +3,7 @@ var timers = require('./timer');
|
|||||||
var jsbot = require('./jsbot');
|
var jsbot = require('./jsbot');
|
||||||
require('./snippets');
|
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) {
|
var DBot = function(dModules, timers) {
|
||||||
this.admin = 'reality';
|
this.admin = 'reality';
|
||||||
@ -12,10 +12,8 @@ var DBot = function(dModules, timers) {
|
|||||||
this.db = JSON.parse(fs.readFileSync('db.json', 'utf-8'));
|
this.db = JSON.parse(fs.readFileSync('db.json', 'utf-8'));
|
||||||
this.timers = timers.create();
|
this.timers = timers.create();
|
||||||
|
|
||||||
this.instance = jsbot.createJSBot(this.name, 'irc.aberwiki.org', 6667, this, function() {
|
this.instance = jsbot.createJSBot(this.name, 'irc.freenode.net', 6667, this, function() {
|
||||||
this.instance.join('#42');
|
this.instance.join('#tdtrs');
|
||||||
this.instance.join('#itonlygetsworse');
|
|
||||||
this.instance.join('#not42');
|
|
||||||
}.bind(this));
|
}.bind(this));
|
||||||
|
|
||||||
this.moduleNames = dModules;
|
this.moduleNames = dModules;
|
||||||
|
Loading…
Reference in New Issue
Block a user