1
0
mirror of https://github.com/anope/anope.git synced 2026-07-02 07:06:38 +02:00

Moved the core pseudo clients out into their own modules

This commit is contained in:
Adam
2011-04-22 03:16:11 -04:00
parent 1782ce260c
commit c8c23158a4
226 changed files with 5187 additions and 4891 deletions
+10 -6
View File
@@ -11,6 +11,7 @@
/*************************************************************************/
#include "module.h"
#include "chanserv.h"
class CommandCSSetMisc : public Command
{
@@ -77,8 +78,8 @@ class CSSetMisc : public Module
if (Commands.empty())
return;
Command *set = FindCommand(ChanServ, "SET");
Command *saset = FindCommand(ChanServ, "SASET");
Command *set = FindCommand(chanserv->Bot(), "SET");
Command *saset = FindCommand(chanserv->Bot(), "SASET");
if (!set && !saset)
return;
@@ -114,10 +115,13 @@ class CSSetMisc : public Module
this->SetAuthor("Anope");
this->SetType(CORE);
if (!chanserv)
throw ModuleException("ChanServ is not loaded!");
Implementation i[] = { I_OnReload, I_OnChanInfo, I_OnDatabaseWriteMetadata, I_OnDatabaseReadMetadata };
ModuleManager::Attach(i, this, 4);
OnReload(true);
OnReload();
}
~CSSetMisc()
@@ -125,12 +129,12 @@ class CSSetMisc : public Module
RemoveAll();
}
void OnReload(bool)
void OnReload()
{
RemoveAll();
Command *set = FindCommand(ChanServ, "SET");
Command *saset = FindCommand(ChanServ, "SASET");
Command *set = FindCommand(chanserv->Bot(), "SET");
Command *saset = FindCommand(chanserv->Bot(), "SASET");
if (!set && !saset)
return;