3
0
mirror of https://github.com/reality/dbot.git synced 2024-12-24 03:33:07 +01:00

remove useless crap from modules [#136]

This commit is contained in:
reality 2013-01-15 16:54:51 +00:00
parent 2e875e7434
commit 1bd1b5aa56
29 changed files with 30 additions and 52 deletions

View File

@ -7,8 +7,6 @@ var fs = require('fs'),
_ = require('underscore')._;
var admin = function(dbot) {
this.name = 'admin';
this.ignorable = false;
};
exports.fetch = function(dbot) {

View File

@ -1,4 +1,5 @@
{
"ignorable": false,
"dbKeys": [ "bans" ],
"help": "http://github.com/reality/depressionbot/blob/master/modules/admin/README.md"
}

View File

@ -6,8 +6,6 @@
*/
var _ = require('underscore')._;
var command = function(dbot) {
this.name = 'command';
this.ignorable = false;
this.dbot = dbot;
/**

View File

@ -1,4 +1,5 @@
{
"ignorable": false,
"help": "http://github.com/reality/depressionbot/blob/master/modules/command/README.md",
"dbKeys": [ "ignores" ]
}

View File

@ -1,4 +1,5 @@
{
"username": "youruserhere",
"password": "yourpasswordhere"
"password": "yourpasswordhere",
"ignorable": true
}

View File

@ -2,7 +2,6 @@ var request = require('request');
_ = require('underscore')._;
var dent = function(dbot) {
this.name = 'dent';
this.dbot = dbot;
this.api = {

3
modules/dice/config.json Normal file
View File

@ -0,0 +1,3 @@
{
"ignorable": true
}

View File

@ -92,10 +92,7 @@ var dice = function(dbot) {
}
}
};
this.name = 'dice';
this.commands = commands;
this.ignorable = true;
}
exports.fetch = function(dbot) {

View File

@ -1,4 +1,5 @@
{
"ignorable": false,
"dbKeys": [ "ignores" ],
"help": "http://github.com/reality/depressionbot/blob/master/modules/ignore/README.md"
}

View File

@ -11,8 +11,8 @@ var ignore = function(dbot) {
'~ignore': function(event) {
var module = event.params[1];
var ignorableModules = _.chain(dbot.modules)
.filter(function(module) {
return module.ignorable !== null && module.ignorable === true;
.filter(function(module, name) {
return dbot.config[module].ignorable === true;
})
.pluck('name')
.value();
@ -71,9 +71,6 @@ var ignore = function(dbot) {
}
}
};
this.name = 'ignore';
this.ignorable = false;
this.commands = commands;
this.onLoad = function() {

View File

@ -4,5 +4,6 @@
"disabled": true
}
},
"ignorable": true,
"help": "http://github.com/reality/depressionbot/blob/master/modules/js/README.md"
}

View File

@ -1,4 +1,5 @@
{
"dbKeys": [ "kicks", "kickers" ],
"help": "http://github.com/reality/depressionbot/blob/master/modules/kick/README.md"
"help": "http://github.com/reality/depressionbot/blob/master/modules/kick/README.md",
"ignorable": true
}

View File

@ -49,9 +49,6 @@ var kick = function(dbot) {
event.reply(orderedKickLeague(dbot.db.kickers, 'Kickers'));
}
};
this.name = 'kick';
this.ignorable = false;
this.commands = commands;
this.listener = function(event) {

View File

@ -1,4 +1,5 @@
{
"autoTitle": false,
"ignorable": true,
"help": "http://github.com/reality/depressionbot/blob/master/modules/link/README.md"
}

View File

@ -33,9 +33,6 @@ var link = function(dbot) {
this.fetchTitle(event, link);
}
};
this.name = 'link';
this.ignorable = true;
this.commands = commands;
this.listener = function(event) {

View File

@ -1,4 +1,5 @@
{
"help": "http://github.com/reality/depressionbot/blob/master/modules/poll/README.md",
"dbKeys": [ "polls" ]
"dbKeys": [ "polls" ],
"ignorable": true
}

View File

@ -1,6 +1,4 @@
var poll = function(dbot) {
this.name = poll;
this.ignorable = true;
};
exports.fetch = function(dbot) {

View File

@ -1,5 +1,6 @@
{
"dbKeys": [ "quoteArrs" ],
"rmLimit": 10,
"ignorable": true,
"help": "http://github.com/reality/depressionbot/blob/master/modules/quotes/README.md"
}

View File

@ -1,9 +1,6 @@
var _ = require('underscore')._;
var quotes = function(dbot) {
this.name = 'quotes';
this.ignorable = true;
dbot.sessionData.rmCache = [];
this.quotes = dbot.db.quoteArrs,
this.addStack = [],

View File

@ -1,3 +1,4 @@
{
"ignorable": true,
"help": "http://github.com/reality/depressionbot/blob/master/modules/report/README.md"
}

View File

@ -32,17 +32,11 @@ var report = function(dbot) {
event.reply(dbot.t('not_in_channel', { 'channel': channelName }));
}
}
};
commands['~report'].regex = [/^~report ([^ ]+) ([^ ]+) (.+)$/, 4];
return {
'name': 'report',
'ignorable': true,
'commands': commands
};
this.commands = commands;
};
exports.fetch = function(dbot) {
return report(dbot);
return new report(dbot);
};

View File

@ -1,3 +1,4 @@
{
"ignorable": true,
"help": "http://github.com/reality/depressionbot/blob/master/modules/spelling/README.md"
}

View File

@ -74,9 +74,6 @@ var distance = function(s1, s2) {
};
var spelling = function(dbot) {
this.name = 'spelling';
this.ignorable = true;
this.last = {};
this.internalAPI = {};
this.internalAPI.correct = function (event, correction, candidate, output_callback) {

View File

@ -1,3 +1,4 @@
{
"ignorable": false,
"dbKeys": [ "knownUsers" ]
}

View File

@ -33,10 +33,6 @@ var users = function(dbot) {
channelUsers[channelName].push(newUser);
}, this);
};
this.name = 'users';
this.ignorable = false;
this.listener = function(event) {
var knownUsers = this.getServerUsers(event.server);

View File

@ -1,4 +1,5 @@
{
"ignorable": false,
"webHost": "localhost",
"webPort": 9001
}

View File

@ -3,13 +3,6 @@ var express = require('express'),
fs = require('fs');
var webInterface = function(dbot) {
this.name = 'web';
this.ignorable = false;
this.onDestroy = function() {
server.close();
}
var pub = 'public';
var app = express();
@ -41,6 +34,10 @@ var webInterface = function(dbot) {
}
}
}.bind(this);
this.onDestroy = function() {
server.close();
}
};
exports.fetch = function(dbot) {

View File

@ -0,0 +1,3 @@
{
"ignorable": true
}

View File

@ -1,7 +1,4 @@
var youAre = function(dbot) {
this.name = 'youare';
this.ignorable = false;
this.listener = function(event) {
var key = event.message.valMatch(/(\bis\b|\bare\b)\s+([\w\s\d]*?)(\s+)?(,|\.|\band\b|$)/, 5);