summaryrefslogtreecommitdiff
path: root/src/core
diff options
context:
space:
mode:
Diffstat (limited to 'src/core')
-rw-r--r--src/core/os_news.c22
-rw-r--r--src/core/os_reload.c3
2 files changed, 7 insertions, 18 deletions
diff --git a/src/core/os_news.c b/src/core/os_news.c
index cc32f8604..e17022e40 100644
--- a/src/core/os_news.c
+++ b/src/core/os_news.c
@@ -34,7 +34,6 @@
void myOperServHelp(User *u);
-int reload_config(int argc, char **argv);
struct newsmsgs {
int16 type;
@@ -381,10 +380,12 @@ class OSNews : public Module
this->AddCommand(OPERSERV, new CommandOSRandomNews(), MOD_UNIQUE);
this->SetOperHelp(myOperServHelp);
+ }
- EvtHook *hook = createEventHook(EVENT_RELOAD, reload_config);
- if (this->AddEventHook(hook) != MOD_ERR_OK)
- throw ModuleException("os_news: Can't hook to EVENT_RELOAD event");
+ void reload_config(bool starting)
+ {
+ OSLogonNews->UpdateHelpParam();
+ OSOperNews->UpdateHelpParam();
}
};
@@ -403,18 +404,5 @@ void myOperServHelp(User *u)
}
}
-/**
- * Upon /os reload refresh the count
- **/
-int reload_config(int argc, char **argv)
-{
- if (argc >= 1 && !stricmp(argv[0], EVENT_START))
- {
- OSLogonNews->UpdateHelpParam();
- OSOperNews->UpdateHelpParam();
- }
-
- return MOD_CONT;
-}
MODULE_INIT("os_news", OSNews)
diff --git a/src/core/os_reload.c b/src/core/os_reload.c
index 400b61f3e..c7f651825 100644
--- a/src/core/os_reload.c
+++ b/src/core/os_reload.c
@@ -35,7 +35,8 @@ class CommandOSReload : public Command
sprintf(const_cast<char *>(quitmsg), /* XXX */ "Error during the reload of the configuration file!");
quitting = 1;
}
- send_event(EVENT_RELOAD, 1, EVENT_START);
+
+ FOREACH_MOD(I_OnReload, OnReload(false));
notice_lang(s_OperServ, u, OPER_RELOAD);
return MOD_CONT;
}