summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAdam <Adam@anope.org>2012-05-06 21:44:11 -0400
committerAdam <Adam@anope.org>2012-05-06 21:44:11 -0400
commitb7149fc9404879ebb9914ea9201f7d53ab6cb792 (patch)
tree0b42e3c076541612c0e2c9ff33171b3bc79b75f3
parent675b113c3e03cf1917b2a731c21fe82b5f1f2b2b (diff)
parentc797987615b4188581d6eafff434b99da411edc0 (diff)
Merge branch '1.9' of anope.git.sf.net:/gitroot/anope/anope into 1.9
-rw-r--r--modules/commands/ns_group.cpp6
-rw-r--r--modules/commands/ns_register.cpp6
2 files changed, 12 insertions, 0 deletions
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)
{