From c797987615b4188581d6eafff434b99da411edc0 Mon Sep 17 00:00:00 2001 From: DukePyrolator Date: Sat, 5 May 2012 09:35:18 +0200 Subject: [PATCH] Readding missing valid nick check to ns register/group removed in os_forbid commit --- modules/commands/ns_group.cpp | 6 ++++++ modules/commands/ns_register.cpp | 6 ++++++ 2 files changed, 12 insertions(+) diff --git a/modules/commands/ns_group.cpp b/modules/commands/ns_group.cpp index dad004eee..e35d760e1 100644 --- a/modules/commands/ns_group.cpp +++ b/modules/commands/ns_group.cpp @@ -36,6 +36,12 @@ class CommandNSGroup : public Command return; } + if (!ircdproto->IsNickValid(u->nick)) + { + source.Reply(NICK_CANNOT_BE_REGISTERED, u->nick.c_str()); + return; + } + if (Config->RestrictOperNicks) for (unsigned i = 0; i < Config->Opers.size(); ++i) { diff --git a/modules/commands/ns_register.cpp b/modules/commands/ns_register.cpp index bbac6d766..f19cf7218 100644 --- a/modules/commands/ns_register.cpp +++ b/modules/commands/ns_register.cpp @@ -150,6 +150,12 @@ class CommandNSRegister : public Command return; } + if (!ircdproto->IsNickValid(u->nick)) + { + source.Reply(NICK_CANNOT_BE_REGISTERED, u->nick.c_str()); + return; + } + if (Config->RestrictOperNicks) for (unsigned i = 0; i < Config->Opers.size(); ++i) {