diff options
| author | rburchell <rburchell@5417fbe8-f217-4b02-8779-1006273d7864> | 2009-02-16 23:48:03 +0000 |
|---|---|---|
| committer | rburchell <rburchell@5417fbe8-f217-4b02-8779-1006273d7864> | 2009-02-16 23:48:03 +0000 |
| commit | d07de70fc3156e143beeb04c0e2bbfb592415ead (patch) | |
| tree | c6f246b68054048f12bf9527c9179014eb544102 /src/modules/os_ignore_db.c | |
| parent | c1c9e17d7995f7e6684316f6dc71d1b43788533f (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/os_ignore_db.c')
| -rw-r--r-- | src/modules/os_ignore_db.c | 21 |
1 files changed, 5 insertions, 16 deletions
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. |
