2013-02-09 17:44:05 +01:00
|
|
|
var ctcp = function(dbot) {
|
|
|
|
var commands = {
|
|
|
|
"\x01VERSION\x01": function(event) {
|
2013-05-21 15:20:26 +02:00
|
|
|
// the current client version
|
2013-02-09 17:44:05 +01:00
|
|
|
event.replyNotice("\x01VERSION " + dbot.config.version + "\x01");
|
2013-05-21 15:20:26 +02:00
|
|
|
},
|
|
|
|
"\x01CLIENTINFO\x01": function(event){
|
|
|
|
// a list of all supported CTCP commands
|
|
|
|
event.replyNotice("\x01CLIENTINFO SOURCE VERSION USERINFO\x01");
|
|
|
|
},
|
|
|
|
"\x01SOURCE\x01": function(event){
|
|
|
|
event.replyNotice("\x01SOURCE https://github.com/reality/depressionbot\x01");
|
|
|
|
},
|
|
|
|
"\x01USERINFO\x01": function(event){
|
|
|
|
// a "witty" saying set by the user
|
|
|
|
event.replyNotice("\z01USERINFO " + dbot.config.name + "\x01");
|
2013-02-09 17:44:05 +01:00
|
|
|
}
|
|
|
|
}
|
|
|
|
this.commands = commands;
|
|
|
|
this.on = 'PRIVMSG';
|
|
|
|
};
|
|
|
|
|
|
|
|
exports.fetch = function(dbot) {
|
|
|
|
return new ctcp(dbot);
|
|
|
|
};
|