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:
@@ -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;
|
||||
|
||||
|
||||
Reference in New Issue
Block a user