mirror of
https://github.com/anope/anope.git
synced 2026-07-04 16:33:13 +02:00
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
This commit is contained in:
parent
08c234b850
commit
0281b73406
@@ -1,6 +1,7 @@
|
||||
Anope Version S V N
|
||||
--------------------
|
||||
Provided by Anope Dev. <dev@anope.org> - 2005
|
||||
09/29 A Configuration option to change fantasy command prefix character. [ #00]
|
||||
09/28 A Event for fantasy commands triggered without channel access. [ #00]
|
||||
09/28 F Made module (un)loading code more friendly for modularized core. [ #00]
|
||||
09/28 F NickServ SASET didn't fill the nick in the 'not registered' line. [ #00]
|
||||
|
||||
@@ -2,6 +2,14 @@ Anope Version S V N
|
||||
-------------------
|
||||
** ADDED CONFIGURATION DIRECTIVES **
|
||||
|
||||
# BSFantasyCharacter [REQUIRED]
|
||||
# This option allows you to change the default prefix for fantasy
|
||||
# commands in channels. This character will have to be prepended to all
|
||||
# fantasy commands. If you choose "!" (the default), fantasy commands
|
||||
# will, for example, be "!kick", "!op", etc.
|
||||
|
||||
BSFantasyCharacter "!"
|
||||
|
||||
** MODIFIED CONFIGURATION DIRECTIVES **
|
||||
|
||||
** DELETED CONFIGURATION DIRECTIVES **
|
||||
|
||||
@@ -1048,6 +1048,14 @@ BSGentleBWReason
|
||||
|
||||
# BSCaseSensitive
|
||||
|
||||
# BSFantasyCharacter [REQUIRED]
|
||||
# This option allows you to change the default prefix for fantasy
|
||||
# commands in channels. This character will have to be prepended to all
|
||||
# fantasy commands. If you choose "!" (the default), fantasy commands
|
||||
# will, for example, be "!kick", "!op", etc.
|
||||
|
||||
BSFantasyCharacter "!"
|
||||
|
||||
###########################################################################
|
||||
#
|
||||
# HostServ configuration
|
||||
|
||||
@@ -397,6 +397,7 @@ E int BSBadWordsMax;
|
||||
E int BSSmartJoin;
|
||||
E int BSGentleBWReason;
|
||||
E int BSCaseSensitive;
|
||||
E char *BSFantasyCharacter;
|
||||
|
||||
E int HideStatsO;
|
||||
E int GlobalOnCycle;
|
||||
|
||||
+10
-2
@@ -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;
|
||||
|
||||
|
||||
@@ -207,6 +207,7 @@ int BSBadWordsMax;
|
||||
int BSSmartJoin;
|
||||
int BSGentleBWReason;
|
||||
int BSCaseSensitive;
|
||||
char *BSFantasyCharacter;
|
||||
|
||||
int HideStatsO;
|
||||
int GlobalOnCycle;
|
||||
@@ -387,6 +388,8 @@ Directive directives[] = {
|
||||
{"BSDefFantasy", {{PARAM_SET, PARAM_RELOAD, &BSDefFantasy}}},
|
||||
{"BSDefSymbiosis", {{PARAM_SET, PARAM_RELOAD, &BSDefSymbiosis}}},
|
||||
{"BSCaseSensitive", {{PARAM_SET, PARAM_RELOAD, &BSCaseSensitive}}},
|
||||
{"BSFantasyCharacter",
|
||||
{{PARAM_STRING, PARAM_RELOAD, &BSFantasyCharacter}}},
|
||||
{"BSGentleBWReason", {{PARAM_SET, PARAM_RELOAD, &BSGentleBWReason}}},
|
||||
{"BSKeepData", {{PARAM_TIME, PARAM_RELOAD, &BSKeepData}}},
|
||||
{"BSMinUsers", {{PARAM_POSINT, PARAM_RELOAD, &BSMinUsers}}},
|
||||
@@ -1316,6 +1319,7 @@ int read_config(int reload)
|
||||
CHECK(BSBadWordsMax);
|
||||
CHECK(BSMinUsers);
|
||||
CHECK(BSKeepData);
|
||||
CHECK(BSFantasyCharacter);
|
||||
if (s_BotServAlias) {
|
||||
if (!stricmp(s_BotServ, s_BotServAlias)) {
|
||||
printf
|
||||
@@ -1323,6 +1327,12 @@ int read_config(int reload)
|
||||
retval = 0;
|
||||
}
|
||||
}
|
||||
if (BSFantasyCharacter && (strlen(BSFantasyCharacter) > 1)) {
|
||||
printf
|
||||
("*** BSFantasyCharacter is more than 1 character long. Only the first\n"
|
||||
"*** character ('%c') will be used. The others will be ignored.\n",
|
||||
*BSFantasyCharacter);
|
||||
}
|
||||
}
|
||||
|
||||
if (s_HostServ) {
|
||||
|
||||
+5
-1
@@ -9,10 +9,14 @@ VERSION_MAJOR="1"
|
||||
VERSION_MINOR="7"
|
||||
VERSION_PATCH="11"
|
||||
VERSION_EXTRA="-svn"
|
||||
VERSION_BUILD="902"
|
||||
VERSION_BUILD="903"
|
||||
|
||||
# $Log$
|
||||
#
|
||||
# BUILD : 1.7.11 (903)
|
||||
# BUGS :
|
||||
# NOTES : Added BSFantasyCharacter configuration option to change the fantasy prefix character
|
||||
#
|
||||
# BUILD : 1.7.11 (902)
|
||||
# BUGS :
|
||||
# NOTES : Changed how /os modload and /os modunload load/unload modules; they are now handled in a queue instead of using the mod_current_* variables
|
||||
|
||||
Reference in New Issue
Block a user