diff options
author | geniusdex geniusdex@31f1291d-b8d6-0310-a050-a5561fc1590b <geniusdex geniusdex@31f1291d-b8d6-0310-a050-a5561fc1590b@5417fbe8-f217-4b02-8779-1006273d7864> | 2005-09-28 13:56:12 +0000 |
---|---|---|
committer | geniusdex geniusdex@31f1291d-b8d6-0310-a050-a5561fc1590b <geniusdex geniusdex@31f1291d-b8d6-0310-a050-a5561fc1590b@5417fbe8-f217-4b02-8779-1006273d7864> | 2005-09-28 13:56:12 +0000 |
commit | 619b109b5207eda5a14c21ba780c16d66280201f (patch) | |
tree | d97c3a38c66c2dc3bdd0189e1a29c98b27e5fe30 | |
parent | 05a6d13bb0e088c881c103a91f2e669d41771be0 (diff) |
BUILD : 1.7.11 (900) BUGS : NOTES : Added an event for fantasy commands triggered by people without CA_FANTASY access on the channel
git-svn-id: svn://svn.anope.org/anope/trunk@900 31f1291d-b8d6-0310-a050-a5561fc1590b
git-svn-id: http://anope.svn.sourceforge.net/svnroot/anope/trunk@646 5417fbe8-f217-4b02-8779-1006273d7864
-rw-r--r-- | Changes | 1 | ||||
-rw-r--r-- | docs/EVENTS | 15 | ||||
-rw-r--r-- | include/events.h | 1 | ||||
-rw-r--r-- | src/botserv.c | 13 | ||||
-rw-r--r-- | version.log | 6 |
5 files changed, 30 insertions, 6 deletions
@@ -1,6 +1,7 @@ Anope Version S V N -------------------- Provided by Anope Dev. <dev@anope.org> - 2005 +09/28 A Event for fantasy commands triggered without channel access. [ #00] Anope Version 1.7.11 --------------------- diff --git a/docs/EVENTS b/docs/EVENTS index e67510e24..47a168387 100644 --- a/docs/EVENTS +++ b/docs/EVENTS @@ -200,6 +200,21 @@ Anope Internal Events command. If none are present, this will not exist, and argc will will be 3. + EVENT_BOT_FANTASY_NO_ACCESS + A fantasy command of the bot has been triggered by someone without + access to BotServ FANTASY commands on the channel. This will NOT + trigger if someone with access has triggered a fantasy command; use + EVENT_BOT_FANTASY for those. Hook to both events to catch both event + triggers. + av[0] The fantasy command that has been triggered with leading '!'. + av[1] The nickname of the user that has triggered the fantasy + command. + av[2] The name of the channel the fantasy command has been triggered + on. + av[3] Contains any optional paramenters passed after the fantasy + command. If none are present, this will not exist, and argc will + will be 3. + EVENT_BOT_JOIN A BotServ bot has joined a channel and opped itself. av[0] The channel name the bot has just joined. diff --git a/include/events.h b/include/events.h index 480c88e3e..42f2c03d0 100644 --- a/include/events.h +++ b/include/events.h @@ -23,6 +23,7 @@ #define EVENT_BOT_CREATE "bot_create" #define EVENT_BOT_CHANGE "bot_change" #define EVENT_BOT_FANTASY "bot_command" +#define EVENT_BOT_FANTASY_NO_ACCESS "bot_command_no_access" #define EVENT_BOT_DEL "bot_del" #define EVENT_BOT_ASSIGN "bot_assign" #define EVENT_TOPIC_UPDATED "chan_topic_updated" diff --git a/src/botserv.c b/src/botserv.c index 6570a75d5..f1a89578d 100644 --- a/src/botserv.c +++ b/src/botserv.c @@ -400,17 +400,20 @@ void botchanmsgs(User * u, ChannelInfo * ci, char *buf) /* Fantaisist commands */ - if (buf && (ci->botflags & BS_FANTASY) && *buf == '!' - && check_access(u, ci, CA_FANTASIA)) { + if (buf && (ci->botflags & BS_FANTASY) && *buf == '!') { cmd = strtok(buf, " "); if (cmd && (cmd[0] == '!')) { char *params = strtok(NULL, ""); + char *event_name = EVENT_BOT_FANTASY_NO_ACCESS; + + if (check_access(u, ci, CA_FANTASIA)) + event_name = EVENT_BOT_FANTASY; + if (params) - send_event(EVENT_BOT_FANTASY, 4, cmd, u->nick, ci->name, - params); + send_event(event_name, 4, cmd, u->nick, ci->name, params); else - send_event(EVENT_BOT_FANTASY, 3, cmd, u->nick, ci->name); + send_event(event_name, 3, cmd, u->nick, ci->name); } } } diff --git a/version.log b/version.log index cec3eb5bf..526f8ce31 100644 --- a/version.log +++ b/version.log @@ -9,10 +9,14 @@ VERSION_MAJOR="1" VERSION_MINOR="7" VERSION_PATCH="11" VERSION_EXTRA="-svn" -VERSION_BUILD="899" +VERSION_BUILD="900" # $Log$ # +# BUILD : 1.7.11 (900) +# BUGS : +# NOTES : Added an event for fantasy commands triggered by people without CA_FANTASY access on the channel +# # BUILD : 1.7.11 (899) # BUGS : # NOTES : Development Framework |