1
0
mirror of https://github.com/anope/anope.git synced 2026-07-07 22:03:14 +02:00

Bug #1219 - Correctly restrict people from registering potentential guest names

This commit is contained in:
Adam
2010-12-26 00:31:11 -05:00
parent 1b3f2567bc
commit 8af2465a61
+1 -1
View File
@@ -213,7 +213,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)
{
source.Reply(NICK_CANNOT_BE_REGISTERED, u->nick.c_str());
return MOD_CONT;