mirror of
https://github.com/reality/dbot.git
synced 2024-12-24 11:42:36 +01:00
remove useless crap from modules [#136]
This commit is contained in:
parent
2e875e7434
commit
1bd1b5aa56
@ -7,8 +7,6 @@ var fs = require('fs'),
|
||||
_ = require('underscore')._;
|
||||
|
||||
var admin = function(dbot) {
|
||||
this.name = 'admin';
|
||||
this.ignorable = false;
|
||||
};
|
||||
|
||||
exports.fetch = function(dbot) {
|
||||
|
@ -1,4 +1,5 @@
|
||||
{
|
||||
"ignorable": false,
|
||||
"dbKeys": [ "bans" ],
|
||||
"help": "http://github.com/reality/depressionbot/blob/master/modules/admin/README.md"
|
||||
}
|
||||
|
@ -6,8 +6,6 @@
|
||||
*/
|
||||
var _ = require('underscore')._;
|
||||
var command = function(dbot) {
|
||||
this.name = 'command';
|
||||
this.ignorable = false;
|
||||
this.dbot = dbot;
|
||||
|
||||
/**
|
||||
|
@ -1,4 +1,5 @@
|
||||
{
|
||||
"ignorable": false,
|
||||
"help": "http://github.com/reality/depressionbot/blob/master/modules/command/README.md",
|
||||
"dbKeys": [ "ignores" ]
|
||||
}
|
||||
|
@ -1,4 +1,5 @@
|
||||
{
|
||||
"username": "youruserhere",
|
||||
"password": "yourpasswordhere"
|
||||
"password": "yourpasswordhere",
|
||||
"ignorable": true
|
||||
}
|
||||
|
@ -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
3
modules/dice/config.json
Normal file
@ -0,0 +1,3 @@
|
||||
{
|
||||
"ignorable": true
|
||||
}
|
@ -92,10 +92,7 @@ var dice = function(dbot) {
|
||||
}
|
||||
}
|
||||
};
|
||||
|
||||
this.name = 'dice';
|
||||
this.commands = commands;
|
||||
this.ignorable = true;
|
||||
}
|
||||
|
||||
exports.fetch = function(dbot) {
|
||||
|
@ -1,4 +1,5 @@
|
||||
{
|
||||
"ignorable": false,
|
||||
"dbKeys": [ "ignores" ],
|
||||
"help": "http://github.com/reality/depressionbot/blob/master/modules/ignore/README.md"
|
||||
}
|
||||
|
@ -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() {
|
||||
|
@ -4,5 +4,6 @@
|
||||
"disabled": true
|
||||
}
|
||||
},
|
||||
"ignorable": true,
|
||||
"help": "http://github.com/reality/depressionbot/blob/master/modules/js/README.md"
|
||||
}
|
||||
|
@ -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
|
||||
}
|
||||
|
@ -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) {
|
||||
|
@ -1,4 +1,5 @@
|
||||
{
|
||||
"autoTitle": false,
|
||||
"ignorable": true,
|
||||
"help": "http://github.com/reality/depressionbot/blob/master/modules/link/README.md"
|
||||
}
|
||||
|
@ -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) {
|
||||
|
@ -1,4 +1,5 @@
|
||||
{
|
||||
"help": "http://github.com/reality/depressionbot/blob/master/modules/poll/README.md",
|
||||
"dbKeys": [ "polls" ]
|
||||
"dbKeys": [ "polls" ],
|
||||
"ignorable": true
|
||||
}
|
||||
|
@ -1,6 +1,4 @@
|
||||
var poll = function(dbot) {
|
||||
this.name = poll;
|
||||
this.ignorable = true;
|
||||
};
|
||||
|
||||
exports.fetch = function(dbot) {
|
||||
|
@ -1,5 +1,6 @@
|
||||
{
|
||||
"dbKeys": [ "quoteArrs" ],
|
||||
"rmLimit": 10,
|
||||
"ignorable": true,
|
||||
"help": "http://github.com/reality/depressionbot/blob/master/modules/quotes/README.md"
|
||||
}
|
||||
|
@ -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 = [],
|
||||
|
@ -1,3 +1,4 @@
|
||||
{
|
||||
"ignorable": true,
|
||||
"help": "http://github.com/reality/depressionbot/blob/master/modules/report/README.md"
|
||||
}
|
||||
|
@ -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);
|
||||
};
|
||||
|
@ -1,3 +1,4 @@
|
||||
{
|
||||
"ignorable": true,
|
||||
"help": "http://github.com/reality/depressionbot/blob/master/modules/spelling/README.md"
|
||||
}
|
||||
|
@ -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) {
|
||||
|
@ -1,3 +1,4 @@
|
||||
{
|
||||
"ignorable": false,
|
||||
"dbKeys": [ "knownUsers" ]
|
||||
}
|
||||
|
@ -34,10 +34,6 @@ var users = function(dbot) {
|
||||
}, this);
|
||||
};
|
||||
|
||||
|
||||
this.name = 'users';
|
||||
this.ignorable = false;
|
||||
|
||||
this.listener = function(event) {
|
||||
var knownUsers = this.getServerUsers(event.server);
|
||||
var nick = event.user;
|
||||
|
@ -1,4 +1,5 @@
|
||||
{
|
||||
"ignorable": false,
|
||||
"webHost": "localhost",
|
||||
"webPort": 9001
|
||||
}
|
||||
|
@ -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) {
|
||||
|
3
modules/youare/config.json
Normal file
3
modules/youare/config.json
Normal file
@ -0,0 +1,3 @@
|
||||
{
|
||||
"ignorable": true
|
||||
}
|
@ -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);
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user