summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--Changes1
-rw-r--r--include/services.h11
-rw-r--r--src/core/bs_bot.c10
-rw-r--r--src/core/os_svsnick.c5
-rw-r--r--version.log6
5 files changed, 19 insertions, 14 deletions
diff --git a/Changes b/Changes
index c641668e0..005969102 100644
--- a/Changes
+++ b/Changes
@@ -10,6 +10,7 @@ Provided by Anope Dev. <dev@anope.org> - 2006
09/10 F Added HOP to the /CS ACCESS error when XOP is enabled. [#598]
09/10 F MySQL no longer connects again on each query. [#595]
09/10 F Nick Enforcers can now be whois'd on services. [#601]
+09/10 F Corrected valid nick characters for /OS SVSNICK. [#599]
Provided by Trystan <trystan@nomadirc.net> - 2006
08/20 F Fixed several compiler warnings. [#586]
diff --git a/include/services.h b/include/services.h
index fddfa02bf..9e83ca158 100644
--- a/include/services.h
+++ b/include/services.h
@@ -1327,6 +1327,17 @@ struct capabinfo_ {
/*************************************************************************/
+/**
+ * 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)=='-' )
+
+/*************************************************************************/
+
#include "extern.h"
/*************************************************************************/
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;
}
}
diff --git a/version.log b/version.log
index 55636071c..5cdfd67a6 100644
--- a/version.log
+++ b/version.log
@@ -9,10 +9,14 @@ VERSION_MAJOR="1"
VERSION_MINOR="7"
VERSION_PATCH="15"
VERSION_EXTRA="-svn"
-VERSION_BUILD="1151"
+VERSION_BUILD="1152"
# $Log$
#
+# 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
+#
# BUILD : 1.7.15 (1151)
# BUGS : 601
# NOTES : Fixed us with reposding we didn't know someone when we were WHOIS'd for a nick enforcer client; now we reply correctly