diff options
author | geniusdex geniusdex@31f1291d-b8d6-0310-a050-a5561fc1590b <geniusdex geniusdex@31f1291d-b8d6-0310-a050-a5561fc1590b@5417fbe8-f217-4b02-8779-1006273d7864> | 2006-09-10 19:46:53 +0000 |
---|---|---|
committer | geniusdex geniusdex@31f1291d-b8d6-0310-a050-a5561fc1590b <geniusdex geniusdex@31f1291d-b8d6-0310-a050-a5561fc1590b@5417fbe8-f217-4b02-8779-1006273d7864> | 2006-09-10 19:46:53 +0000 |
commit | 8b87cc15abddd37cb05521f736cda3ef5c3127a0 (patch) | |
tree | a8e3d9610e7987e9317d09f23fd59e5a0767e886 /src | |
parent | 60b3c3568a275caa0ac1a386a9f03982cd3a4ffd (diff) |
BUILD : 1.7.15 (1152) BUGS : 599 NOTES : Corrected valid nick characters for /OS SVSNICK by making the bs_bot isvalidnick() macro global via services.h
git-svn-id: svn://svn.anope.org/anope/trunk@1152 31f1291d-b8d6-0310-a050-a5561fc1590b
git-svn-id: http://anope.svn.sourceforge.net/svnroot/anope/trunk@875 5417fbe8-f217-4b02-8779-1006273d7864
Diffstat (limited to 'src')
-rw-r--r-- | src/core/bs_bot.c | 10 | ||||
-rw-r--r-- | src/core/os_svsnick.c | 5 |
2 files changed, 2 insertions, 13 deletions
diff --git a/src/core/bs_bot.c b/src/core/bs_bot.c index 32ee6b7b8..04cc38b89 100644 --- a/src/core/bs_bot.c +++ b/src/core/bs_bot.c @@ -15,16 +15,6 @@ #include "module.h" -/** - * RFC: defination of a valid nick - * nickname = ( letter / special ) *8( letter / digit / special / "-" ) - * letter = %x41-5A / %x61-7A ; A-Z / a-z - * digit = %x30-39 ; 0-9 - * special = %x5B-60 / %x7B-7D ; "[", "]", "\", "`", "_", "^", "{", "|", "}" - **/ -#define isvalidnick(c) ( isalnum(c) || ((c) >='\x5B' && (c) <='\x60') || ((c) >='\x7B' && (c) <='\x7D') || (c)=='-' ) - - int do_bot(User * u); int delbot(BotInfo * bi); void myBotServHelp(User * u); diff --git a/src/core/os_svsnick.c b/src/core/os_svsnick.c index 9c0af28ca..d5d456aec 100644 --- a/src/core/os_svsnick.c +++ b/src/core/os_svsnick.c @@ -101,10 +101,9 @@ int do_svsnick(User * u) notice_lang(s_OperServ, u, NICK_X_ILLEGAL, newnick); return MOD_CONT; } -#define isvalid(c) (((c) >= 'A' && (c) <= '~') || isdigit(c) || (c) == '-') for (c = newnick; *c && (c - newnick) < NICKMAX; c++) { - if (!isvalid(*c) || isspace(*c)) { - notice_lang(s_OperServ, u, NICK_X_ILLEGAL, nick); + if (!isvalidnick(*c)) { + notice_lang(s_OperServ, u, NICK_X_ILLEGAL, newnick); return MOD_CONT; } } |