1
0
mirror of https://github.com/anope/anope.git synced 2026-06-12 18:54:47 +02:00

BUILD : 1.7.5 (354) BUGS : NOTES : Added RestrictOpernicks by request. Small feature.

git-svn-id: svn://svn.anope.org/anope/trunk@354 31f1291d-b8d6-0310-a050-a5561fc1590b


git-svn-id: http://anope.svn.sourceforge.net/svnroot/anope/trunk@230 5417fbe8-f217-4b02-8779-1006273d7864
This commit is contained in:
certus certus@31f1291d-b8d6-0310-a050-a5561fc1590b
2004-09-20 17:05:47 +00:00
parent 3a4570a131
commit fcd9c968ee
7 changed files with 47 additions and 3 deletions
+2 -1
View File
@@ -1,8 +1,9 @@
Anope Version S V N
-------------------
Provided by Anope Dev. <dev@anope.org> - 2004
08/24 A New -l option for am script to list possible selectors. [ #00]
09/20 A Added RestrictOperNicks as new feature in services.conf. [ #00]
09/08 A Removed rand() and ported bsd's arc4random() to fit our needs. [ #00]
08/24 A New -l option for am script to list possible selectors. [ #00]
09/19 F Rewrote the internals of moduleData to save lots of memory. [ #00]
09/17 F Fixed MySQL error, whereby checks are only done if mysql is on. [ #00]
09/14 F Fixed /os MODE by joining nested ifs into one. [ #00]
+8
View File
@@ -12,6 +12,14 @@ Anope Version S V N
#UserKey2 5216332
#UserKey3 9651291
# RestrictOperNick [OPTIONAL]
# Forbids the registration of nicks that contain nick with services
# access. So if Tester is a Services Oper, for example, You can't
# register NewTester or Tester123 unless you are an IRC operator.
#RestrictOperNicks
** MODIFIED CONFIGURATION DIRECTIVES **
** DELETED CONFIGURATION DIRECTIVES **
+6
View File
@@ -458,6 +458,12 @@ GlobalOnCycleUP "Services are now back online - have a nice day"
# option on a pre-1.4.35 Bahamut, it is most likely to break.
#UseSVSHOLD
# RestrictOperNick [OPTIONAL]
# Forbids the registration of nicks that contain nick with services
# access. So if Tester is a Services Oper, for example, You can't
# register NewTester or Tester123 unless you are an IRC operator.
#RestrictOperNicks
###########################################################################
#
# Mail-related options
+1
View File
@@ -291,6 +291,7 @@ E int DumpCore;
E int LogUsers;
E int NickRegDelay;
E int UseSVSHOLD;
E int RestrictOperNicks;
E char **HostSetters;
E int HostNumber;
+2
View File
@@ -225,6 +225,7 @@ int BSCaseSensitive;
int HideStatsO;
int GlobalOnCycle;
int AnonymousGlobal;
int RestrictOperNicks;
char *GlobalOnCycleMessage;
char *GlobalOnCycleUP;
char *ServicesRoot;
@@ -590,6 +591,7 @@ Directive directives[] = {
{PARAM_PORT, 0, &RemotePort3},
{PARAM_STRING, 0, &RemotePassword3}}},
{"RestrictMail", {{PARAM_SET, PARAM_RELOAD, &RestrictMail}}},
{"RestrictOperNicks", {{PARAM_SET, PARAM_RELOAD, &RestrictOperNicks}}},
{"SendMailPath", {{PARAM_STRING, PARAM_RELOAD, &SendMailPath}}},
{"SendFrom", {{PARAM_STRING, PARAM_RELOAD, &SendFrom}}},
{"ServerDesc", {{PARAM_STRING, 0, &ServerDesc}}},
+23 -1
View File
@@ -1930,12 +1930,13 @@ static int do_help(User * u)
static int do_register(User * u)
{
NickRequest *nr = NULL, *anr = NULL;
NickCore *nc = NULL;
int prefixlen = strlen(NSGuestNickPrefix);
int nicklen = strlen(u->nick);
char *pass = strtok(NULL, " ");
char *email = strtok(NULL, " ");
char passcode[11];
int idx, min = 1, max = 62;
int idx, min = 1, max = 62, i = 0;
int chars[] =
{ ' ', 'a', 'b', 'c', 'd', 'e', 'f', 'g', 'h', 'i', 'j', 'k', 'l',
'm', 'n', 'o', 'p', 'q', 'r', 's', 't', 'u', 'v', 'w', 'x', 'y',
@@ -1976,6 +1977,27 @@ static int do_register(User * u)
return MOD_CONT;
}
if (RestrictOperNicks) {
for (i = 0; i < RootNumber; i++) {
if (strstr(u->nick, ServicesRoots[i]) && !is_oper(u)) {
notice_lang(s_NickServ, u, NICK_CANNOT_BE_REGISTERED, u->nick);
return MOD_CONT;
}
}
for (i = 0; i < servadmins.count && (nc = servadmins.list[i]);i++) {
if (strstr(u->nick, nc->display) && !is_oper(u)) {
notice_lang(s_NickServ, u, NICK_CANNOT_BE_REGISTERED, u->nick);
return MOD_CONT;
}
}
for (i = 0; i < servopers.count && (nc = servopers.list[i]);i++) {
if (strstr(u->nick, nc->display) && !is_oper(u)) {
notice_lang(s_NickServ, u, NICK_CANNOT_BE_REGISTERED, u->nick);
return MOD_CONT;
}
}
}
if (!pass || (NSForceEmail && !email)) {
syntax_error(s_NickServ, u, "REGISTER",
NICK_REGISTER_SYNTAX_EMAIL);
+5 -1
View File
@@ -8,10 +8,14 @@
VERSION_MAJOR="1"
VERSION_MINOR="7"
VERSION_PATCH="5"
VERSION_BUILD="353"
VERSION_BUILD="354"
# $Log$
#
# BUILD : 1.7.5 (354)
# BUGS :
# NOTES : Added RestrictOpernicks by request. Small feature.
#
# BUILD : 1.7.5 (353)
# BUGS : N/A
# NOTES : Fixed version booboo :)