summaryrefslogtreecommitdiff
path: root/src/modules/ns_maxemail.c
diff options
context:
space:
mode:
authorcyberbotx <cyberbotx@5417fbe8-f217-4b02-8779-1006273d7864>2008-11-19 00:48:29 +0000
committercyberbotx <cyberbotx@5417fbe8-f217-4b02-8779-1006273d7864>2008-11-19 00:48:29 +0000
commit0f069f0e8becfd1770a6ce396ead7aa67e3bde06 (patch)
treeede474534d89b32bcdcc24d58e5cca6c427d6176 /src/modules/ns_maxemail.c
parent1a2fdff0c653562ebde967850875e5445bc0c5ae (diff)
Converted modules to use ConfigReader to access new config parser.
Added all module directives to new config. Removed references to old config parser (not sure if I got them all, though). git-svn-id: http://anope.svn.sourceforge.net/svnroot/anope/trunk@1756 5417fbe8-f217-4b02-8779-1006273d7864
Diffstat (limited to 'src/modules/ns_maxemail.c')
-rw-r--r--src/modules/ns_maxemail.c17
1 files changed, 7 insertions, 10 deletions
diff --git a/src/modules/ns_maxemail.c b/src/modules/ns_maxemail.c
index b2f82eb41..29773dfe5 100644
--- a/src/modules/ns_maxemail.c
+++ b/src/modules/ns_maxemail.c
@@ -1,12 +1,12 @@
/* ns_maxemail.c - Limit the amount of times an email address
* can be used for a NickServ account.
- *
+ *
* (C) 2003-2008 Anope Team
* Contact us at info@anope.org
- *
+ *
* Included in the Anope module pack since Anope 1.7.9
* Anope Coder: GeniusDex <geniusdex@anope.org>
- *
+ *
* Please read COPYING and README for further details.
*
* Send any bug reports to the Anope Coder, as he will be able
@@ -168,10 +168,10 @@ int my_ns_set(User * u)
cur_buffer = moduleGetLastBuffer();
set = myStrGetToken(cur_buffer, ' ', 0);
-
+
if (!set)
return MOD_CONT;
-
+
if (stricmp(set, "email") != 0) {
free(set);
return MOD_CONT;
@@ -198,11 +198,8 @@ int my_event_reload(int argc, char **argv)
void my_load_config(void)
{
- Directive confvalues[] = {
- {"NSEmailMax", {{PARAM_INT, PARAM_RELOAD, &NSEmailMax}}}
- };
-
- moduleGetConfigDirective(confvalues);
+ ConfigReader config;
+ NSEmailMax = config.ReadInteger("ns_maxemail", "maxemails", "0", 0, false);
if (debug)
alog("debug: [ns_maxemail] NSEmailMax set to %d", NSEmailMax);