summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/core/ns_group.c11
1 files changed, 8 insertions, 3 deletions
diff --git a/src/core/ns_group.c b/src/core/ns_group.c
index 2b0b9a92a..3be4060d9 100644
--- a/src/core/ns_group.c
+++ b/src/core/ns_group.c
@@ -6,8 +6,8 @@
* Please read COPYING and README for further details.
*
* Based on the original code of Epona by Lara.
- * Based on the original code of Services by Andy Church.
- *
+ * Based on the original code of Services by Andy Church.
+ *
* $Id$
*
*/
@@ -111,6 +111,11 @@ int do_group(User * u)
return MOD_CONT;
}
+ if (!anope_valid_nick(u->nick)) {
+ notice_lang(s_NickServ, u, NICK_X_FORBIDDEN, u->nick);
+ return MOD_CONT;
+ }
+
if (RestrictOperNicks) {
for (i = 0; i < RootNumber; i++) {
if (stristr(u->nick, ServicesRoots[i]) && !is_oper(u)) {
@@ -233,7 +238,7 @@ int do_group(User * u)
if (ircd->modeonreg) {
len = strlen(ircd->modeonreg);
strncpy(modes,ircd->modeonreg,512);
- if(ircd->rootmodeonid && is_services_root(u)) {
+ if(ircd->rootmodeonid && is_services_root(u)) {
strncat(modes,ircd->rootmodeonid,512-len);
} else if(ircd->adminmodeonid && is_services_admin(u)) {
strncat(modes,ircd->adminmodeonid,512-len);