summaryrefslogtreecommitdiff
path: root/src/modules/os_info.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/os_info.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/os_info.c')
-rw-r--r--src/modules/os_info.c34
1 files changed, 9 insertions, 25 deletions
diff --git a/src/modules/os_info.c b/src/modules/os_info.c
index 0c5e040b6..f6e0d3318 100644
--- a/src/modules/os_info.c
+++ b/src/modules/os_info.c
@@ -49,7 +49,6 @@ int mLoadData();
int mSaveData(int argc, char **argv);
int mBackupData(int argc, char **argv);
int mLoadConfig();
-int mEventReload(int argc, char **argv);
static Module *me;
@@ -311,9 +310,6 @@ class OSInfo : public Module
hook = createEventHook(EVENT_DB_BACKUP, mBackupData);
status = this->AddEventHook(hook);
- hook = createEventHook(EVENT_RELOAD, mEventReload);
- status = this->AddEventHook(hook);
-
this->SetNickHelp(mMainNickHelp);
this->SetChanHelp(mMainChanHelp);
@@ -557,6 +553,15 @@ class OSInfo : public Module
if (OSInfoDBName)
delete [] OSInfoDBName;
}
+
+ void OnReload(bool starting)
+ {
+ alog("os_info: Reloading configuration directives...");
+ int ret = mLoadConfig();
+
+ if (ret)
+ alog("os_info.c: ERROR: An error has occured while reloading the configuration file");
+ }
};
/*************************************************************************/
@@ -710,27 +715,6 @@ int mLoadConfig()
return 0;
}
-/**
- * Manage the RELOAD EVENT
- * @return MOD_CONT
- **/
-int mEventReload(int argc, char **argv)
-{
- int ret = 0;
- if (argc >= 1)
- {
- if (!stricmp(argv[0], EVENT_START))
- {
- alog("os_info: Reloading configuration directives...");
- ret = mLoadConfig();
- }
- }
-
- if (ret)
- alog("os_info.c: ERROR: An error has occured while reloading the configuration file");
-
- return MOD_CONT;
-}
/*************************************************************************/