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')._;
|
_ = require('underscore')._;
|
||||||
|
|
||||||
var admin = function(dbot) {
|
var admin = function(dbot) {
|
||||||
this.name = 'admin';
|
|
||||||
this.ignorable = false;
|
|
||||||
};
|
};
|
||||||
|
|
||||||
exports.fetch = function(dbot) {
|
exports.fetch = function(dbot) {
|
||||||
|
@ -1,4 +1,5 @@
|
|||||||
{
|
{
|
||||||
|
"ignorable": false,
|
||||||
"dbKeys": [ "bans" ],
|
"dbKeys": [ "bans" ],
|
||||||
"help": "http://github.com/reality/depressionbot/blob/master/modules/admin/README.md"
|
"help": "http://github.com/reality/depressionbot/blob/master/modules/admin/README.md"
|
||||||
}
|
}
|
||||||
|
@ -6,8 +6,6 @@
|
|||||||
*/
|
*/
|
||||||
var _ = require('underscore')._;
|
var _ = require('underscore')._;
|
||||||
var command = function(dbot) {
|
var command = function(dbot) {
|
||||||
this.name = 'command';
|
|
||||||
this.ignorable = false;
|
|
||||||
this.dbot = dbot;
|
this.dbot = dbot;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
@ -1,4 +1,5 @@
|
|||||||
{
|
{
|
||||||
|
"ignorable": false,
|
||||||
"help": "http://github.com/reality/depressionbot/blob/master/modules/command/README.md",
|
"help": "http://github.com/reality/depressionbot/blob/master/modules/command/README.md",
|
||||||
"dbKeys": [ "ignores" ]
|
"dbKeys": [ "ignores" ]
|
||||||
}
|
}
|
||||||
|
@ -1,4 +1,5 @@
|
|||||||
{
|
{
|
||||||
"username": "youruserhere",
|
"username": "youruserhere",
|
||||||
"password": "yourpasswordhere"
|
"password": "yourpasswordhere",
|
||||||
|
"ignorable": true
|
||||||
}
|
}
|
||||||
|
@ -2,7 +2,6 @@ var request = require('request');
|
|||||||
_ = require('underscore')._;
|
_ = require('underscore')._;
|
||||||
|
|
||||||
var dent = function(dbot) {
|
var dent = function(dbot) {
|
||||||
this.name = 'dent';
|
|
||||||
this.dbot = dbot;
|
this.dbot = dbot;
|
||||||
|
|
||||||
this.api = {
|
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.commands = commands;
|
||||||
this.ignorable = true;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
exports.fetch = function(dbot) {
|
exports.fetch = function(dbot) {
|
||||||
|
@ -1,4 +1,5 @@
|
|||||||
{
|
{
|
||||||
|
"ignorable": false,
|
||||||
"dbKeys": [ "ignores" ],
|
"dbKeys": [ "ignores" ],
|
||||||
"help": "http://github.com/reality/depressionbot/blob/master/modules/ignore/README.md"
|
"help": "http://github.com/reality/depressionbot/blob/master/modules/ignore/README.md"
|
||||||
}
|
}
|
||||||
|
@ -11,8 +11,8 @@ var ignore = function(dbot) {
|
|||||||
'~ignore': function(event) {
|
'~ignore': function(event) {
|
||||||
var module = event.params[1];
|
var module = event.params[1];
|
||||||
var ignorableModules = _.chain(dbot.modules)
|
var ignorableModules = _.chain(dbot.modules)
|
||||||
.filter(function(module) {
|
.filter(function(module, name) {
|
||||||
return module.ignorable !== null && module.ignorable === true;
|
return dbot.config[module].ignorable === true;
|
||||||
})
|
})
|
||||||
.pluck('name')
|
.pluck('name')
|
||||||
.value();
|
.value();
|
||||||
@ -71,9 +71,6 @@ var ignore = function(dbot) {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
this.name = 'ignore';
|
|
||||||
this.ignorable = false;
|
|
||||||
this.commands = commands;
|
this.commands = commands;
|
||||||
|
|
||||||
this.onLoad = function() {
|
this.onLoad = function() {
|
||||||
|
@ -4,5 +4,6 @@
|
|||||||
"disabled": true
|
"disabled": true
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
"ignorable": true,
|
||||||
"help": "http://github.com/reality/depressionbot/blob/master/modules/js/README.md"
|
"help": "http://github.com/reality/depressionbot/blob/master/modules/js/README.md"
|
||||||
}
|
}
|
||||||
|
@ -1,4 +1,5 @@
|
|||||||
{
|
{
|
||||||
"dbKeys": [ "kicks", "kickers" ],
|
"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'));
|
event.reply(orderedKickLeague(dbot.db.kickers, 'Kickers'));
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
this.name = 'kick';
|
|
||||||
this.ignorable = false;
|
|
||||||
this.commands = commands;
|
this.commands = commands;
|
||||||
|
|
||||||
this.listener = function(event) {
|
this.listener = function(event) {
|
||||||
|
@ -1,4 +1,5 @@
|
|||||||
{
|
{
|
||||||
"autoTitle": false,
|
"autoTitle": false,
|
||||||
|
"ignorable": true,
|
||||||
"help": "http://github.com/reality/depressionbot/blob/master/modules/link/README.md"
|
"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.fetchTitle(event, link);
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
this.name = 'link';
|
|
||||||
this.ignorable = true;
|
|
||||||
this.commands = commands;
|
this.commands = commands;
|
||||||
|
|
||||||
this.listener = function(event) {
|
this.listener = function(event) {
|
||||||
|
@ -1,4 +1,5 @@
|
|||||||
{
|
{
|
||||||
"help": "http://github.com/reality/depressionbot/blob/master/modules/poll/README.md",
|
"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) {
|
var poll = function(dbot) {
|
||||||
this.name = poll;
|
|
||||||
this.ignorable = true;
|
|
||||||
};
|
};
|
||||||
|
|
||||||
exports.fetch = function(dbot) {
|
exports.fetch = function(dbot) {
|
||||||
|
@ -1,5 +1,6 @@
|
|||||||
{
|
{
|
||||||
"dbKeys": [ "quoteArrs" ],
|
"dbKeys": [ "quoteArrs" ],
|
||||||
"rmLimit": 10,
|
"rmLimit": 10,
|
||||||
|
"ignorable": true,
|
||||||
"help": "http://github.com/reality/depressionbot/blob/master/modules/quotes/README.md"
|
"help": "http://github.com/reality/depressionbot/blob/master/modules/quotes/README.md"
|
||||||
}
|
}
|
||||||
|
@ -1,9 +1,6 @@
|
|||||||
var _ = require('underscore')._;
|
var _ = require('underscore')._;
|
||||||
|
|
||||||
var quotes = function(dbot) {
|
var quotes = function(dbot) {
|
||||||
this.name = 'quotes';
|
|
||||||
this.ignorable = true;
|
|
||||||
|
|
||||||
dbot.sessionData.rmCache = [];
|
dbot.sessionData.rmCache = [];
|
||||||
this.quotes = dbot.db.quoteArrs,
|
this.quotes = dbot.db.quoteArrs,
|
||||||
this.addStack = [],
|
this.addStack = [],
|
||||||
|
@ -1,3 +1,4 @@
|
|||||||
{
|
{
|
||||||
|
"ignorable": true,
|
||||||
"help": "http://github.com/reality/depressionbot/blob/master/modules/report/README.md"
|
"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 }));
|
event.reply(dbot.t('not_in_channel', { 'channel': channelName }));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
};
|
};
|
||||||
commands['~report'].regex = [/^~report ([^ ]+) ([^ ]+) (.+)$/, 4];
|
commands['~report'].regex = [/^~report ([^ ]+) ([^ ]+) (.+)$/, 4];
|
||||||
|
this.commands = commands;
|
||||||
return {
|
|
||||||
'name': 'report',
|
|
||||||
'ignorable': true,
|
|
||||||
'commands': commands
|
|
||||||
};
|
|
||||||
};
|
};
|
||||||
|
|
||||||
exports.fetch = function(dbot) {
|
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"
|
"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) {
|
var spelling = function(dbot) {
|
||||||
this.name = 'spelling';
|
|
||||||
this.ignorable = true;
|
|
||||||
|
|
||||||
this.last = {};
|
this.last = {};
|
||||||
this.internalAPI = {};
|
this.internalAPI = {};
|
||||||
this.internalAPI.correct = function (event, correction, candidate, output_callback) {
|
this.internalAPI.correct = function (event, correction, candidate, output_callback) {
|
||||||
|
@ -1,3 +1,4 @@
|
|||||||
{
|
{
|
||||||
|
"ignorable": false,
|
||||||
"dbKeys": [ "knownUsers" ]
|
"dbKeys": [ "knownUsers" ]
|
||||||
}
|
}
|
||||||
|
@ -33,10 +33,6 @@ var users = function(dbot) {
|
|||||||
channelUsers[channelName].push(newUser);
|
channelUsers[channelName].push(newUser);
|
||||||
}, this);
|
}, this);
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
||||||
this.name = 'users';
|
|
||||||
this.ignorable = false;
|
|
||||||
|
|
||||||
this.listener = function(event) {
|
this.listener = function(event) {
|
||||||
var knownUsers = this.getServerUsers(event.server);
|
var knownUsers = this.getServerUsers(event.server);
|
||||||
|
@ -1,4 +1,5 @@
|
|||||||
{
|
{
|
||||||
|
"ignorable": false,
|
||||||
"webHost": "localhost",
|
"webHost": "localhost",
|
||||||
"webPort": 9001
|
"webPort": 9001
|
||||||
}
|
}
|
||||||
|
@ -3,13 +3,6 @@ var express = require('express'),
|
|||||||
fs = require('fs');
|
fs = require('fs');
|
||||||
|
|
||||||
var webInterface = function(dbot) {
|
var webInterface = function(dbot) {
|
||||||
this.name = 'web';
|
|
||||||
this.ignorable = false;
|
|
||||||
|
|
||||||
this.onDestroy = function() {
|
|
||||||
server.close();
|
|
||||||
}
|
|
||||||
|
|
||||||
var pub = 'public';
|
var pub = 'public';
|
||||||
var app = express();
|
var app = express();
|
||||||
|
|
||||||
@ -41,6 +34,10 @@ var webInterface = function(dbot) {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
}.bind(this);
|
}.bind(this);
|
||||||
|
|
||||||
|
this.onDestroy = function() {
|
||||||
|
server.close();
|
||||||
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
exports.fetch = function(dbot) {
|
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) {
|
var youAre = function(dbot) {
|
||||||
this.name = 'youare';
|
|
||||||
this.ignorable = false;
|
|
||||||
|
|
||||||
this.listener = function(event) {
|
this.listener = function(event) {
|
||||||
var key = event.message.valMatch(/(\bis\b|\bare\b)\s+([\w\s\d]*?)(\s+)?(,|\.|\band\b|$)/, 5);
|
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