summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAdam <Adam@anope.org>2010-12-26 00:31:11 -0500
committerAdam <Adam@anope.org>2010-12-26 00:31:50 -0500
commitb5091a373e8ee9a2781ccc7673597f0f97b5e1b3 (patch)
tree90c44d8b914d7e2512821f60082a0287a12e9f96
parent8e898c2e3e73de4e6a4874105ba9860338ac565e (diff)
Bug #1219 - Correctly restrict people from registering potentential guest names
(cherry picked from commit 8af2465a61b09e020c1324acfb78bbf912869fc8)
-rw-r--r--modules/core/ns_register.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/modules/core/ns_register.cpp b/modules/core/ns_register.cpp
index a2af5ad7e..5633dadea 100644
--- a/modules/core/ns_register.cpp
+++ b/modules/core/ns_register.cpp
@@ -218,7 +218,7 @@ class CommandNSRegister : public CommandNSConfirm
/* Guest nick can now have a series of between 1 and 7 digits.
* --lara
*/
- if (nicklen <= prefixlen + 7 && nicklen >= prefixlen + 1 && !u->nick.find_ci(Config->NSGuestNickPrefix) && !u->nick.substr(prefixlen).find_first_not_of("1234567890"))
+ if (nicklen <= prefixlen + 7 && nicklen >= prefixlen + 1 && !u->nick.find_ci(Config->NSGuestNickPrefix) && u->nick.substr(prefixlen).find_first_not_of("1234567890") == Anope::string::npos)
{
u->SendMessage(NickServ, NICK_CANNOT_BE_REGISTERED, u->nick.c_str());
return MOD_CONT;