summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorcertus certus@31f1291d-b8d6-0310-a050-a5561fc1590b <certus certus@31f1291d-b8d6-0310-a050-a5561fc1590b@5417fbe8-f217-4b02-8779-1006273d7864>2004-04-08 20:10:16 +0000
committercertus certus@31f1291d-b8d6-0310-a050-a5561fc1590b <certus certus@31f1291d-b8d6-0310-a050-a5561fc1590b@5417fbe8-f217-4b02-8779-1006273d7864>2004-04-08 20:10:16 +0000
commit8a0869f0c731746c35aca213c8f6467951249eca (patch)
tree6054b38a983db22e503764083631c8d72ffb642b
parenta9c609678f1de663b0f662daa43afed499fcd289 (diff)
BUILD : 1.7.0 (37) BUGS : NOTES : Added NickRegDelay which prevents users from regging their nick if they are not connected for at least X seconds.
git-svn-id: svn://svn.anope.org/anope/trunk@37 31f1291d-b8d6-0310-a050-a5561fc1590b git-svn-id: http://anope.svn.sourceforge.net/svnroot/anope/trunk@27 5417fbe8-f217-4b02-8779-1006273d7864
-rw-r--r--Changes1
-rw-r--r--Changes.conf5
-rw-r--r--Changes.lang1
-rw-r--r--config.c2
-rw-r--r--data/example.conf5
-rw-r--r--extern.h1
-rw-r--r--lang/de.l2
-rw-r--r--lang/en_us.l2
-rw-r--r--lang/index1
-rw-r--r--nickserv.c6
-rw-r--r--version.log6
11 files changed, 31 insertions, 1 deletions
diff --git a/Changes b/Changes
index 06e056b98..3d2082d67 100644
--- a/Changes
+++ b/Changes
@@ -1,6 +1,7 @@
Anope Version 1.7.0
--------------------
Provided by Anope Dev. <dev@anope.org>
+2004/04/08 Added NickRegDelay. Nicks have to be connected longer than X seconds before a /ns register.
2004/04/08 Added "is a services root administrator" to /ns info.
2004/04/08 Added option for SOs and above to hide their services access status in /ns info.
2004/04/07 Added -help arguement for command line parameters.
diff --git a/Changes.conf b/Changes.conf
index c0d663dab..7aa51f0ff 100644
--- a/Changes.conf
+++ b/Changes.conf
@@ -9,5 +9,10 @@ Anope Version 1.7.0
#
#UseRDB
+# NickRegDelay <seconds> [OPTIONAL]
+# Prevents users from regging their nick if they are not
+# connected for at least X seconds.
+#NickRegDelay 30
+
** MODIFIED CONFIGURATION DIRECTIVES **
** DELETED CONFIGURATION DIRECTIVES **
diff --git a/Changes.lang b/Changes.lang
index b558414a5..a3f12d55f 100644
--- a/Changes.lang
+++ b/Changes.lang
@@ -12,6 +12,7 @@ Anope Version 1.7.0
NICK_INFO_SERVICES_ROOT
NICK_SET_HIDE_STATUS_ON
NICK_SET_HIDE_STATUS_OFF
+ NICK_REG_DELAY
*** Mod Strings:
MEMO_SET_NOTIFY_SYNTAX
diff --git a/config.c b/config.c
index a610bc4bf..1a112ce87 100644
--- a/config.c
+++ b/config.c
@@ -115,6 +115,7 @@ int ForceForbidReason;
int UsePrivmsg;
int DumpCore;
int LogUsers;
+int NickRegDelay;
int UseMail;
char *SendMailPath;
@@ -500,6 +501,7 @@ Directive directives[] = {
{"NickservDB", {{PARAM_STRING, PARAM_RELOAD, &NickDBName}}},
{"PreNickServDB", {{PARAM_STRING, PARAM_RELOAD, &PreNickDBName}}},
{"NSEmailReg", {{PARAM_SET, PARAM_RELOAD, &NSEmailReg}}},
+ {"NickRegDelay", {{PARAM_INT, PARAM_RELOAD, &NickRegDelay}}},
{"NickServName", {{PARAM_STRING, 0, &s_NickServ},
{PARAM_STRING, 0, &desc_NickServ}}},
{"NickServAlias", {{PARAM_STRING, 0, &s_NickServAlias},
diff --git a/data/example.conf b/data/example.conf
index 4aa0688cf..333dc41d3 100644
--- a/data/example.conf
+++ b/data/example.conf
@@ -432,6 +432,11 @@ GlobalOnCycleUP "Services are now back online - have a nice day"
# hides the oper's nick in a global message/notice
#AnonymousGlobal
+# NickRegDelay <seconds> [OPTIONAL]
+# Prevents users from regging their nick if they are not
+# connected for at least X seconds.
+#NickRegDelay 30
+
###########################################################################
#
# Mail-related options
diff --git a/extern.h b/extern.h
index be43c6bb4..8f49c1959 100644
--- a/extern.h
+++ b/extern.h
@@ -276,6 +276,7 @@ E int ForceForbidReason;
E int UsePrivmsg;
E int DumpCore;
E int LogUsers;
+E int NickRegDelay;
E char **HostSetters;
E int HostNumber;
diff --git a/lang/de.l b/lang/de.l
index 8597d2fb2..5311482df 100644
--- a/lang/de.l
+++ b/lang/de.l
@@ -344,6 +344,8 @@ NICK_REGISTERED
Nickname %s ist unter deinem Host registriert worden: %s
NICK_PASSWORD_IS
Dein Passwort ist %s - behalte es für spätere Benutzung.
+NICK_REG_DELAY
+ Du musst länger als %d Sekunden connected sein, um einen Nick zu registrieren.
# GROUP responses
NICK_GROUP_SYNTAX
diff --git a/lang/en_us.l b/lang/en_us.l
index 81c431d75..e103802e0 100644
--- a/lang/en_us.l
+++ b/lang/en_us.l
@@ -326,6 +326,8 @@ NICK_REGISTERED
Nickname %s registered under your account: %s
NICK_PASSWORD_IS
Your password is %s - remember this for later use.
+NICK_REG_DELAY
+ You have to be connected longer than %d seconds to register your nick.
# GROUP responses
NICK_GROUP_SYNTAX
diff --git a/lang/index b/lang/index
index 519a75971..2cc90aaab 100644
--- a/lang/index
+++ b/lang/index
@@ -84,6 +84,7 @@ NICK_CANNOT_BE_REGISTERED
NICK_ALREADY_REGISTERED
NICK_REGISTERED
NICK_PASSWORD_IS
+NICK_REG_DELAY
NICK_GROUP_SYNTAX
NICK_GROUP_DISABLED
NICK_GROUP_FAILED
diff --git a/nickserv.c b/nickserv.c
index c5311f349..1eb64fc62 100644
--- a/nickserv.c
+++ b/nickserv.c
@@ -1898,6 +1898,12 @@ static int do_register(User * u)
return MOD_CONT;
}
+ if (!is_oper(u) && NickRegDelay
+ && ((time(NULL) - u->my_signon) < NickRegDelay)) {
+ notice_lang(s_NickServ, u, NICK_REG_DELAY, NickRegDelay);
+ return MOD_CONT;
+ }
+
if ((anr = findrequestnick(u->nick))) {
notice_lang(s_NickServ, u, NICK_REQUESTED);
return MOD_CONT;
diff --git a/version.log b/version.log
index 5670b1d47..09ddf16a0 100644
--- a/version.log
+++ b/version.log
@@ -8,11 +8,15 @@
VERSION_MAJOR="1"
VERSION_MINOR="7"
VERSION_PATCH="0"
-VERSION_BUILD="36"
+VERSION_BUILD="37"
VERSION_EXTRA=""
# $Log$
#
+# BUILD : 1.7.0 (37)
+# BUGS :
+# NOTES : Added NickRegDelay which prevents users from regging their nick if they are not connected for at least X seconds.
+#
# BUILD : 1.7.0 (36)
# BUGS :
# NOTES : 1. Added "is a services root administrator" to /ns info. 2. Added option for SOs and above to hide their services