1
0
mirror of https://github.com/anope/anope.git synced 2026-06-29 09:56:39 +02:00

Made MemoServ optional

This commit is contained in:
Adam
2010-10-02 00:07:39 -04:00
parent e3afb119b9
commit a62d824cb4
7 changed files with 35 additions and 31 deletions
+8 -15
View File
@@ -12,29 +12,16 @@
#include "services.h"
#include "modules.h"
/*************************************************************************/
/* *INDENT-OFF* */
static bool SendMemoMail(NickCore *nc, Memo *m);
/*************************************************************************/
void moduleAddMemoServCmds()
{
ModuleManager::LoadModuleList(Config->MemoServCoreModules);
}
/*************************************************************************/
/*************************************************************************/
/* *INDENT-ON* */
/**
* MemoServ initialization.
* @return void
*/
void ms_init()
{
moduleAddMemoServCmds();
if (!Config->s_MemoServ.empty())
ModuleManager::LoadModuleList(Config->MemoServCoreModules);
}
/*************************************************************************/
@@ -47,6 +34,9 @@ void ms_init()
*/
void check_memos(User *u)
{
if (Config->s_MemoServ.empty())
return;
if (!u)
{
Log() << "check_memos called with NULL values";
@@ -167,6 +157,9 @@ MemoInfo *getmemoinfo(const Anope::string &name, bool &ischan, bool &isforbid)
*/
void memo_send(User *u, const Anope::string &name, const Anope::string &text, int z)
{
if (Config->s_MemoServ.empty())
return;
bool ischan, isforbid;
MemoInfo *mi;
Anope::string source = u->Account()->display;