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

Backport of fix for bug 1000, do not allow a nick to be grouped if the IRCd protocol deems the nick invalid.

git-svn-id: http://anope.svn.sourceforge.net/svnroot/anope/stable@1926 5417fbe8-f217-4b02-8779-1006273d7864
This commit is contained in:
cyberbotx
2009-01-22 11:49:08 +00:00
parent a68730adb1
commit 5a191ce5a6
+8 -3
View File
@@ -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);