summaryrefslogtreecommitdiff
path: root/src/botserv.c
diff options
context:
space:
mode:
authorgeniusdex geniusdex@31f1291d-b8d6-0310-a050-a5561fc1590b <geniusdex geniusdex@31f1291d-b8d6-0310-a050-a5561fc1590b@5417fbe8-f217-4b02-8779-1006273d7864>2005-09-29 08:21:04 +0000
committergeniusdex geniusdex@31f1291d-b8d6-0310-a050-a5561fc1590b <geniusdex geniusdex@31f1291d-b8d6-0310-a050-a5561fc1590b@5417fbe8-f217-4b02-8779-1006273d7864>2005-09-29 08:21:04 +0000
commit0281b73406a3f4094f9ccb7265be06138a3ca10c (patch)
tree7998b1fc9c43405f7ac2cbf8fa7270e93a174170 /src/botserv.c
parent08c234b8508a45a575187cf0a4c6961843849a94 (diff)
BUILD : 1.7.11 (903) BUGS : NOTES : Added BSFantasyCharacter configuration option to change the fantasy prefix character
git-svn-id: svn://svn.anope.org/anope/trunk@903 31f1291d-b8d6-0310-a050-a5561fc1590b git-svn-id: http://anope.svn.sourceforge.net/svnroot/anope/trunk@649 5417fbe8-f217-4b02-8779-1006273d7864
Diffstat (limited to 'src/botserv.c')
-rw-r--r--src/botserv.c12
1 files changed, 10 insertions, 2 deletions
diff --git a/src/botserv.c b/src/botserv.c
index f1a89578d..735e608c4 100644
--- a/src/botserv.c
+++ b/src/botserv.c
@@ -400,13 +400,21 @@ void botchanmsgs(User * u, ChannelInfo * ci, char *buf)
/* Fantaisist commands */
- if (buf && (ci->botflags & BS_FANTASY) && *buf == '!') {
+ if (buf && (ci->botflags & BS_FANTASY) && *buf == *BSFantasyCharacter) {
cmd = strtok(buf, " ");
- if (cmd && (cmd[0] == '!')) {
+ if (cmd && (cmd[0] == *BSFantasyCharacter)) {
char *params = strtok(NULL, "");
char *event_name = EVENT_BOT_FANTASY_NO_ACCESS;
+ /* Warning: Hack Ahead
+ * To allow older modules to still work safely with the fantasy
+ * events, we replace the first char with '!' so that the cmd will
+ * be !trigger, and not *trigger or whatever, which will confuse
+ * them. Should be replaced after 1.8 -GD
+ */
+ cmd[0] = '!';
+
if (check_access(u, ci, CA_FANTASIA))
event_name = EVENT_BOT_FANTASY;