2013-10-28 17:44:37 +01:00
|
|
|
/**
|
|
|
|
* Module Name: charybdis
|
|
|
|
* Description: charybdis and atheme mode references
|
|
|
|
*/
|
|
|
|
var _ = require('underscore')._;
|
|
|
|
|
2014-09-04 17:26:28 +02:00
|
|
|
var atheme = function(dbot) {
|
2013-10-28 17:44:37 +01:00
|
|
|
this.commands = {
|
|
|
|
'~chanserv': function(event) {
|
|
|
|
if(_.has(this.config.chanserv, event.input[1])) {
|
|
|
|
event.reply('ChanServ flag ' + event.input[1] + ': ' + this.config.chanserv[event.input[1]]);
|
|
|
|
} else {
|
|
|
|
event.reply('I don\'t know anything about ' + event.input[1]);
|
|
|
|
}
|
|
|
|
},
|
|
|
|
|
|
|
|
'~chanmode': function(event) {
|
|
|
|
if(_.has(this.config.chanmodes, event.input[1])) {
|
|
|
|
event.reply('Channel Mode ' + event.input[1] + ': ' + this.config.chanmodes[event.input[1]]);
|
|
|
|
} else {
|
|
|
|
event.reply('I don\'t know anything about ' + event.input[1]);
|
|
|
|
}
|
|
|
|
}
|
|
|
|
};
|
2014-09-04 17:26:28 +02:00
|
|
|
this.commands['~chanserv'].regex = [/^chanserv (\+.)/, 2];
|
|
|
|
this.commands['~chanmode'].regex = [/^chanmode (\+.)/, 2];
|
2013-10-28 17:44:37 +01:00
|
|
|
};
|
|
|
|
|
|
|
|
exports.fetch = function(dbot) {
|
2014-09-04 17:26:28 +02:00
|
|
|
return new atheme(dbot);
|
2013-10-28 17:44:37 +01:00
|
|
|
};
|