summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorgeniusdex geniusdex@31f1291d-b8d6-0310-a050-a5561fc1590b <geniusdex geniusdex@31f1291d-b8d6-0310-a050-a5561fc1590b@5417fbe8-f217-4b02-8779-1006273d7864>2004-11-18 18:18:07 +0000
committergeniusdex geniusdex@31f1291d-b8d6-0310-a050-a5561fc1590b <geniusdex geniusdex@31f1291d-b8d6-0310-a050-a5561fc1590b@5417fbe8-f217-4b02-8779-1006273d7864>2004-11-18 18:18:07 +0000
commit8e846fa002c0cd448b07ce1de6a1918cbef22530 (patch)
tree18d581b01c6bc40052471047f366856ef5cbf0e0
parente5e98cc9e55706dfe2eaffde57abda48ec5c1b6a (diff)
BUILD : 1.7.6 (448) BUGS : NOTES : Added NSAddAccessOnReg config directive
git-svn-id: svn://svn.anope.org/anope/trunk@448 31f1291d-b8d6-0310-a050-a5561fc1590b git-svn-id: http://anope.svn.sourceforge.net/svnroot/anope/trunk@302 5417fbe8-f217-4b02-8779-1006273d7864
-rw-r--r--Changes1
-rw-r--r--Changes.conf9
-rw-r--r--Changes.lang2
-rw-r--r--data/example.conf9
-rw-r--r--include/extern.h1
-rw-r--r--lang/en_us.l2
-rw-r--r--src/config.c2
-rw-r--r--src/nickserv.c19
-rw-r--r--version.log6
9 files changed, 45 insertions, 6 deletions
diff --git a/Changes b/Changes
index 5c22115e7..984aa17d1 100644
--- a/Changes
+++ b/Changes
@@ -2,6 +2,7 @@ Anope Version S V N
-------------------
Provided by Anope Dev. <dev@anope.org> - 2004
11/18 A Unable to use registered nicknames as bot nicks from now on. [ #00]
+11/18 A NSAddAccessOnReg to control access list on registration. [ #00]
Provided by Trystan <trystan@nomadirc.net> - 2004
11/16 F NickTracking could allow usage of forbidden nick in some cases. [ #00]
diff --git a/Changes.conf b/Changes.conf
index 1408c2b83..18e759627 100644
--- a/Changes.conf
+++ b/Changes.conf
@@ -2,6 +2,15 @@ Anope Version S V N
-------------------
** ADDED CONFIGURATION DIRECTIVES **
+# NSAddAccessOnReg [OPTIONAL]
+#
+# When enabled, services will add the usermask of registering users to the
+# access list of their newly created account. If you disable this, users
+# will always have to identify to nickserv before being recognized, unless
+# they manually add an address to the access list of their account.
+
+NSAddAccessOnReg
+
** MODIFIED CONFIGURATION DIRECTIVES **
** DELETED CONFIGURATION DIRECTIVES **
diff --git a/Changes.lang b/Changes.lang
index 46660611d..2d0a097dd 100644
--- a/Changes.lang
+++ b/Changes.lang
@@ -2,6 +2,8 @@ Anope Version S V N
-------------------
*** New Strings:
+ NICK_REGISTERED_NO_MASK
+
*** Mod Strings:
*** Del Strings:
diff --git a/data/example.conf b/data/example.conf
index 93019ea94..f910fe2b0 100644
--- a/data/example.conf
+++ b/data/example.conf
@@ -872,6 +872,15 @@ NSRestrictGetPass
#NSNickTracking
+# NSAddAccessOnReg [OPTIONAL]
+#
+# When enabled, services will add the usermask of registering users to the
+# access list of their newly created account. If you disable this, users
+# will always have to identify to nickserv before being recognized, unless
+# they manually add an address to the access list of their account.
+
+NSAddAccessOnReg
+
###########################################################################
#
# ChanServ configuration
diff --git a/include/extern.h b/include/extern.h
index 78c3769d4..6f0a103c9 100644
--- a/include/extern.h
+++ b/include/extern.h
@@ -359,6 +359,7 @@ E int NSEmailReg;
E int NSModeOnID;
E int NSRestrictGetPass;
E int NSNickTracking;
+E int NSAddAccessOnReg;
E int CSDefFlags;
E int CSMaxReg;
diff --git a/lang/en_us.l b/lang/en_us.l
index 251eeee47..1196f1994 100644
--- a/lang/en_us.l
+++ b/lang/en_us.l
@@ -326,6 +326,8 @@ NICK_ALREADY_REGISTERED
Nickname %s is already registered!
NICK_REGISTERED
Nickname %s registered under your account: %s
+NICK_REGISTERED_NO_MASK
+ Nickname %s registered.
NICK_PASSWORD_IS
Your password is %s - remember this for later use.
NICK_REG_DELAY
diff --git a/src/config.c b/src/config.c
index 35ab3d981..51cce1a26 100644
--- a/src/config.c
+++ b/src/config.c
@@ -180,6 +180,7 @@ int NSEmailReg;
int NSModeOnID;
int NSRestrictGetPass;
int NSNickTracking;
+int NSAddAccessOnReg;
int CSDefNone;
int CSDefKeepTopic;
@@ -559,6 +560,7 @@ Directive directives[] = {
{{PARAM_SET, PARAM_RELOAD, &NSStrictPrivileges}}},
{"NSRestrictGetPass", {{PARAM_SET, PARAM_RELOAD, &NSRestrictGetPass}}},
{"NSNickTracking", {{PARAM_SET, PARAM_RELOAD, &NSNickTracking}}},
+ {"NSAddAccessOnReg", {{PARAM_SET, PARAM_RELOAD, &NSAddAccessOnReg}}},
{"OperServDB", {{PARAM_STRING, PARAM_RELOAD, &OperDBName}}},
{"OperServName", {{PARAM_STRING, 0, &s_OperServ},
{PARAM_STRING, 0, &desc_OperServ}}},
diff --git a/src/nickserv.c b/src/nickserv.c
index 7fcea6dab..a22e33f8e 100644
--- a/src/nickserv.c
+++ b/src/nickserv.c
@@ -2277,9 +2277,14 @@ static int do_confirm(User * u)
na->last_realname = sstrdup(u->realname);
}
na->time_registered = na->last_seen = time(NULL);
- na->nc->accesscount = 1;
- na->nc->access = scalloc(sizeof(char *), 1);
- na->nc->access[0] = create_mask(u);
+ if (NSAddAccessOnReg) {
+ na->nc->accesscount = 1;
+ na->nc->access = scalloc(sizeof(char *), 1);
+ na->nc->access[0] = create_mask(u);
+ } else {
+ na->nc->accesscount = 0;
+ na->nc->access = NULL;
+ }
na->nc->language = NSDefLanguage;
if (email)
na->nc->email = sstrdup(email);
@@ -2289,8 +2294,12 @@ static int do_confirm(User * u)
alog("%s: '%s' registered by %s@%s (e-mail: %s)", s_NickServ,
u->nick, u->username, common_get_vhost(u),
(email ? email : "none"));
- notice_lang(s_NickServ, u, NICK_REGISTERED, u->nick,
- na->nc->access[0]);
+ if (NSAddAccessOnReg)
+ notice_lang(s_NickServ, u, NICK_REGISTERED, u->nick,
+ na->nc->access[0]);
+ else
+ notice_lang(s_NickServ, u, NICK_REGISTERED_NO_MASK,
+ u->nick);
#ifndef USE_ENCRYPTION
notice_lang(s_NickServ, u, NICK_PASSWORD_IS, na->nc->pass);
#endif
diff --git a/version.log b/version.log
index bd3f2e449..345699d86 100644
--- a/version.log
+++ b/version.log
@@ -8,10 +8,14 @@
VERSION_MAJOR="1"
VERSION_MINOR="7"
VERSION_PATCH="6"
-VERSION_BUILD="447"
+VERSION_BUILD="448"
# $Log$
#
+# BUILD : 1.7.6 (448)
+# BUGS :
+# NOTES : Added NSAddAccessOnReg config directive
+#
# BUILD : 1.7.6 (447)
# BUGS :
# NOTES : New botserv bot nicks need to be unregistered nicks from now on