diff options
-rw-r--r-- | Changes | 4 | ||||
-rw-r--r-- | include/module.h | 6 | ||||
-rw-r--r-- | src/core/bs_bot.c | 7 |
3 files changed, 17 insertions, 0 deletions
@@ -5,6 +5,7 @@ Provided by Anope Dev. <dev@anope.org> - 2005 07/01 A Events for channel access/xop updates. [ #00] 06/26 A New module pack module: hs_request. [ #00] 06/03 A Protocol files can now fill mod_current_buffer with custom code. [#389] +08/05 F Bot max nick length limited by NICKMAX now. [ #00] 07/07 F Typing mistake in module error message. [ #00] 07/07 F Clarified comments for SendmailPath regarding -t option. [ #00] 07/02 F Module languages now default to NSDefLanguage, not English. [ #00] @@ -24,6 +25,9 @@ Provided by Anope Dev. <dev@anope.org> - 2005 05/25 F Fixed mydbgen so it sends the pass and installs in the data dir. [ #00] 05/25 F Not all nick options were displayed in listnicks. [#380] +Provided by Hal9000 <hal9000@musichat.net> - 2005 +06/25 F Updated Italian langauge file. [ #00] + Provided by Ricardo <ricardoltdb@gmail.com> - 2005 06/25 A Portugese translation for hs_request. [ #00] 05/30 F Updated Portuguese language file. And bundled modules language. [ #00] diff --git a/include/module.h b/include/module.h index fa09f545c..1b92f95c4 100644 --- a/include/module.h +++ b/include/module.h @@ -1,3 +1,6 @@ +#ifndef MODULE_H +#define MODULE_H + #include "services.h" #include "commands.h" #include "language.h" @@ -7,3 +10,6 @@ #define MOD_UNIQUE 0 #define MOD_HEAD 1 #define MOD_TAIL 2 + +#endif + diff --git a/src/core/bs_bot.c b/src/core/bs_bot.c index 0e604a410..af4a587d9 100644 --- a/src/core/bs_bot.c +++ b/src/core/bs_bot.c @@ -84,6 +84,7 @@ int do_bot(User * u) BotInfo *bi; char *cmd = strtok(NULL, " "); char *ch = NULL; + int len; if (!cmd) syntax_error(s_BotServ, u, "BOT", BOT_BOT_SYNTAX); @@ -99,6 +100,9 @@ int do_bot(User * u) notice_lang(s_BotServ, u, BOT_BOT_READONLY); else if (findbot(nick)) notice_lang(s_BotServ, u, BOT_BOT_ALREADY_EXISTS, nick); + else if((len=strlen(nick))>NICKMAX) { + notice_lang(s_BotServ, u, BOT_BAD_NICK); + } else { NickAlias *na; @@ -191,6 +195,9 @@ int do_bot(User * u) notice_lang(s_BotServ, u, BOT_BOT_READONLY); else if (!(bi = findbot(oldnick))) notice_lang(s_BotServ, u, BOT_DOES_NOT_EXIST, oldnick); + else if((len=strlen(nick))>NICKMAX) { + notice_lang(s_BotServ, u, BOT_BAD_NICK); + } else { NickAlias *na; |