diff options
| author | geniusdex geniusdex@31f1291d-b8d6-0310-a050-a5561fc1590b <geniusdex geniusdex@31f1291d-b8d6-0310-a050-a5561fc1590b@5417fbe8-f217-4b02-8779-1006273d7864> | 2006-09-29 17:54:07 +0000 |
|---|---|---|
| committer | geniusdex geniusdex@31f1291d-b8d6-0310-a050-a5561fc1590b <geniusdex geniusdex@31f1291d-b8d6-0310-a050-a5561fc1590b@5417fbe8-f217-4b02-8779-1006273d7864> | 2006-09-29 17:54:07 +0000 |
| commit | f11e06eca8712a1dd7d308713baee2e4dd6d6997 (patch) | |
| tree | d996b910b9e77135b2a9501b7fd79fce90bd9f46 /src/modules/os_info.c | |
| parent | c565a28c43dd73b167c45dde4a7f7fb41183a7a5 (diff) | |
BUILD : 1.7.15 (1162) BUGS : 604 NOTES : Added functions to let modules backup their own databases and added this functionality to the bundled modules
git-svn-id: svn://svn.anope.org/anope/trunk@1162 31f1291d-b8d6-0310-a050-a5561fc1590b
git-svn-id: http://anope.svn.sourceforge.net/svnroot/anope/trunk@884 5417fbe8-f217-4b02-8779-1006273d7864
Diffstat (limited to 'src/modules/os_info.c')
| -rw-r--r-- | src/modules/os_info.c | 15 |
1 files changed, 15 insertions, 0 deletions
diff --git a/src/modules/os_info.c b/src/modules/os_info.c index e1af20d8c..9f2d3aa05 100644 --- a/src/modules/os_info.c +++ b/src/modules/os_info.c @@ -55,6 +55,7 @@ void m_AddLanguages(void); int mLoadData(void); int mSaveData(int argc, char **argv); +int mBackupData(int argc, char **argv); int mLoadConfig(); int mEventReload(int argc, char **argv); @@ -99,6 +100,9 @@ int AnopeInit(int argc, char **argv) hook = createEventHook(EVENT_DB_SAVING, mSaveData); status = moduleAddEventHook(hook); + hook = createEventHook(EVENT_DB_BACKUP, mBackupData); + status = moduleAddEventHook(hook); + hook = createEventHook(EVENT_RELOAD, mEventReload); status = moduleAddEventHook(hook); @@ -450,6 +454,17 @@ int mSaveData(int argc, char **argv) } /** + * Backup our databases using the commands provided by Anope + * @return MOD_CONT + **/ +int mBackupData(int argc, char **argv) +{ + ModuleDatabaseBackup(OSInfoDBName); + + return MOD_CONT; +} + +/** * Load the configuration directives from Services configuration file. * @return 0 for success **/ |
