From d07de70fc3156e143beeb04c0e2bbfb592415ead Mon Sep 17 00:00:00 2001 From: rburchell Date: Mon, 16 Feb 2009 23:48:03 +0000 Subject: Move EVENT_RELOAD to OnReload. git-svn-id: http://anope.svn.sourceforge.net/svnroot/anope/trunk@2103 5417fbe8-f217-4b02-8779-1006273d7864 --- src/modules/os_ignore_db.c | 21 +++++---------------- 1 file changed, 5 insertions(+), 16 deletions(-) (limited to 'src/modules/os_ignore_db.c') diff --git a/src/modules/os_ignore_db.c b/src/modules/os_ignore_db.c index 45a99a665..2497f3b94 100644 --- a/src/modules/os_ignore_db.c +++ b/src/modules/os_ignore_db.c @@ -72,7 +72,6 @@ int backup_ignoredb(int argc, char **argv); void load_ignore_db(); void save_ignore_db(); void load_config(); -int reload_config(int argc, char **argv); /* ------------------------------------------------------------------------------- */ @@ -88,10 +87,6 @@ class OSIgnoreDB : public Module this->SetVersion(VERSION); this->SetType(SUPPORTED); - hook = createEventHook(EVENT_RELOAD, reload_config); - if (this->AddEventHook(hook) != MOD_ERR_OK) - throw ModuleException("os_ignore_db: Can't hook to EVENT_RELOAD event"); - hook = createEventHook(EVENT_DB_SAVING, save_ignoredb); if (this->AddEventHook(hook) != MOD_ERR_OK) throw ModuleException("os_ignore_db: Can't hook to EVENT_DB_SAVING event"); @@ -113,6 +108,11 @@ class OSIgnoreDB : public Module if (IgnoreDB) delete [] IgnoreDB; } + + void OnReload(bool starting) + { + load_config(); + } }; @@ -132,17 +132,6 @@ void load_config() { alog("[os_ignore_db] debug: Set config vars: OSIgnoreDBName='%s'", IgnoreDB); } -/** - * Upon /os reload call the routines for reloading the configuration directives - **/ -int reload_config(int argc, char **argv) { - if (argc >= 1) { - if (!stricmp(argv[0], EVENT_START)) { - load_config(); - } - } - return MOD_CONT; -} /** * When anope saves her databases, we do the same. -- cgit