summaryrefslogtreecommitdiff
path: root/src/modules/ns_maxemail.c
diff options
context:
space:
mode:
authorrburchell <rburchell@5417fbe8-f217-4b02-8779-1006273d7864>2009-02-16 23:48:03 +0000
committerrburchell <rburchell@5417fbe8-f217-4b02-8779-1006273d7864>2009-02-16 23:48:03 +0000
commitd07de70fc3156e143beeb04c0e2bbfb592415ead (patch)
treec6f246b68054048f12bf9527c9179014eb544102 /src/modules/ns_maxemail.c
parentc1c9e17d7995f7e6684316f6dc71d1b43788533f (diff)
Move EVENT_RELOAD to OnReload.
git-svn-id: http://anope.svn.sourceforge.net/svnroot/anope/trunk@2103 5417fbe8-f217-4b02-8779-1006273d7864
Diffstat (limited to 'src/modules/ns_maxemail.c')
-rw-r--r--src/modules/ns_maxemail.c18
1 files changed, 5 insertions, 13 deletions
diff --git a/src/modules/ns_maxemail.c b/src/modules/ns_maxemail.c
index 38215dd60..5a6e4ff7e 100644
--- a/src/modules/ns_maxemail.c
+++ b/src/modules/ns_maxemail.c
@@ -20,7 +20,6 @@
void my_load_config();
void my_add_languages();
-int my_event_reload(int argc, char **argv);
CommandReturn check_email_limit_reached(const char *email, User * u);
int NSEmailMax = 0;
@@ -90,10 +89,6 @@ class NSMaxEmail : public Module
this->AddCommand(NICKSERV, new CommandNSRegister(), MOD_HEAD);
this->AddCommand(NICKSERV, new CommandNSSet(), MOD_HEAD);
- evt = createEventHook(EVENT_RELOAD, my_event_reload);
- if ((status = this->AddEventHook(evt)))
- throw ModuleException("ns_maxemail: Unable to hook to EVENT_RELOAD");
-
my_load_config();
const char *langtable_en_us[] = {
@@ -145,6 +140,11 @@ class NSMaxEmail : public Module
this->InsertLanguage(LANG_RU, LNG_NUM_STRINGS, langtable_ru);
this->InsertLanguage(LANG_IT, LNG_NUM_STRINGS, langtable_it);
}
+
+ void OnReload(bool started)
+ {
+ my_load_config();
+ }
};
@@ -185,14 +185,6 @@ CommandReturn check_email_limit_reached(const char *email, User * u)
return MOD_STOP;
}
-int my_event_reload(int argc, char **argv)
-{
- if (argc > 0 && !stricmp(argv[0], EVENT_START))
- my_load_config();
-
- return MOD_CONT;
-}
-
void my_load_config()
{
ConfigReader config;