forked from GitHub/dbot
Added CTCP VERSION responding. New config option for version.
This commit is contained in:
parent
c33d7b3720
commit
8c828213d0
@ -15,5 +15,6 @@
|
|||||||
"moderators": [ "whatever" ],
|
"moderators": [ "whatever" ],
|
||||||
"moduleNames": [ "ignore", "admin", "command", "dice", "js", "kick", "quotes", "spelling", "youare", "stats", "users" ],
|
"moduleNames": [ "ignore", "admin", "command", "dice", "js", "kick", "quotes", "spelling", "youare", "stats", "users" ],
|
||||||
"language": "english",
|
"language": "english",
|
||||||
"debugMode": true
|
"debugMode": true,
|
||||||
|
"version": "Depressionbot IRC Bot 0.4-dev. https://github.com/reality/depressionbot/"
|
||||||
}
|
}
|
||||||
|
2
jsbot
2
jsbot
@ -1 +1 @@
|
|||||||
Subproject commit 27d57d8589c13b464780b4c5ce5ce3675cc2a7f2
|
Subproject commit 2c255c34ef35e9edf8cd8bd947269efd6f166b2f
|
5
modules/ctcp/README.md
Normal file
5
modules/ctcp/README.md
Normal file
@ -0,0 +1,5 @@
|
|||||||
|
## CTCP
|
||||||
|
Responds to CTCP commands.
|
||||||
|
|
||||||
|
## Description
|
||||||
|
At the moment only CTCP VERSION, CTCP PING is handled in JSBot.
|
3
modules/ctcp/config.json
Normal file
3
modules/ctcp/config.json
Normal file
@ -0,0 +1,3 @@
|
|||||||
|
{
|
||||||
|
"ignorable": true
|
||||||
|
}
|
13
modules/ctcp/ctcp.js
Normal file
13
modules/ctcp/ctcp.js
Normal file
@ -0,0 +1,13 @@
|
|||||||
|
var ctcp = function(dbot) {
|
||||||
|
var commands = {
|
||||||
|
"\x01VERSION\x01": function(event) {
|
||||||
|
event.replyNotice("\x01VERSION " + dbot.config.version + "\x01");
|
||||||
|
}
|
||||||
|
}
|
||||||
|
this.commands = commands;
|
||||||
|
this.on = 'PRIVMSG';
|
||||||
|
};
|
||||||
|
|
||||||
|
exports.fetch = function(dbot) {
|
||||||
|
return new ctcp(dbot);
|
||||||
|
};
|
Loading…
Reference in New Issue
Block a user