diff options
| author | cyberbotx <cyberbotx@5417fbe8-f217-4b02-8779-1006273d7864> | 2009-04-06 21:25:56 +0000 |
|---|---|---|
| committer | cyberbotx <cyberbotx@5417fbe8-f217-4b02-8779-1006273d7864> | 2009-04-06 21:25:56 +0000 |
| commit | 578da38d30893ca33cc1aa9183e4b82d67c831f3 (patch) | |
| tree | cd2bada4c31d277463d44a63a8257339dbbcad26 /src/modules/os_info.c | |
| parent | fbb1ab92468cce3b4414a1232c4efc77d34e27c8 (diff) | |
Replace Set*Help() functions with virtual *ServHelp() functions that can be overriden in a module's Module class. Patch from Adam.
git-svn-id: http://anope.svn.sourceforge.net/svnroot/anope/trunk@2266 5417fbe8-f217-4b02-8779-1006273d7864
Diffstat (limited to 'src/modules/os_info.c')
| -rw-r--r-- | src/modules/os_info.c | 33 |
1 files changed, 11 insertions, 22 deletions
diff --git a/src/modules/os_info.c b/src/modules/os_info.c index 74f5ab34d..e1234156a 100644 --- a/src/modules/os_info.c +++ b/src/modules/os_info.c @@ -42,9 +42,6 @@ char *OSInfoDBName = NULL; -void mMainChanHelp(User *u); -void mMainNickHelp(User *u); - int mLoadData(); int mLoadConfig(); @@ -252,9 +249,6 @@ class OSInfo : public Module ModuleManager::Attach(I_OnSaveDatabase, this); ModuleManager::Attach(I_OnBackupDatabase, this); - this->SetNickHelp(mMainNickHelp); - this->SetChanHelp(mMainChanHelp); - mLoadData(); ModuleManager::Attach(I_OnReload, this); @@ -589,6 +583,17 @@ class OSInfo : public Module ModuleDatabaseBackup(OSInfoDBName); } + void NickServHelp(User *u) + { + if (is_oper(u)) + this->NoticeLang(s_NickServ, u, OINFO_HELP_CMD); + } + + void ChanServHelp(User *u) + { + if (is_oper(u)) + this->NoticeLang(s_ChanServ, u, OCINFO_HELP_CMD); + } }; /*************************************************************************/ @@ -676,20 +681,4 @@ int mLoadConfig() /*************************************************************************/ -/* This help will be added to the main NickServ list */ -void mMainNickHelp(User *u) -{ - if (is_oper(u)) - me->NoticeLang(s_NickServ, u, OINFO_HELP_CMD); -} - -/* This help will be added to the main ChanServ list */ -void mMainChanHelp(User *u) -{ - if (is_oper(u)) - me->NoticeLang(s_ChanServ, u, OCINFO_HELP_CMD); -} - -/*************************************************************************/ - MODULE_INIT("os_info", OSInfo) |
