Remove fake modules

They aren't needed anymore and most likely won't be needed any time soon.


git-svn-id: https://znc.svn.sourceforge.net/svnroot/znc/trunk@2013 726aef4b-f618-498e-8847-2d620e286838
This commit is contained in:
psychon
2010-06-07 12:35:00 +00:00
parent e4e9d295e5
commit 769f7623d9
2 changed files with 2 additions and 30 deletions
+1 -26
View File
@@ -104,7 +104,6 @@ const CString& CTimer::GetDescription() const { return m_sDescription; }
CModule::CModule(ModHandle pDLL, CUser* pUser, const CString& sModName, const CString& sDataDir) {
m_bFake = false;
m_bGlobal = false;
m_pDLL = pDLL;
m_pManager = &(CZNC::Get().GetManager());;
@@ -120,7 +119,6 @@ CModule::CModule(ModHandle pDLL, CUser* pUser, const CString& sModName, const CS
}
CModule::CModule(ModHandle pDLL, const CString& sModName, const CString& sDataDir) {
m_bFake = false;
m_pDLL = pDLL;
m_pManager = &(CZNC::Get().GetManager());
m_pUser = NULL;
@@ -639,7 +637,7 @@ CModule* CModules::FindModule(const CString& sModule) const {
return NULL;
}
bool CModules::LoadModule(const CString& sModule, const CString& sArgs, CUser* pUser, CString& sRetMsg, bool bFake) {
bool CModules::LoadModule(const CString& sModule, const CString& sArgs, CUser* pUser, CString& sRetMsg) {
sRetMsg = "";
if (FindModule(sModule) != NULL) {
@@ -647,16 +645,6 @@ bool CModules::LoadModule(const CString& sModule, const CString& sArgs, CUser* p
return false;
}
if (bFake) {
CModule* pModule = new CModule(NULL, sModule, "");
pModule->SetArgs(sArgs);
pModule->SetDescription("<<Fake Module>>");
pModule->SetFake(true);
push_back(pModule);
sRetMsg = "Loaded fake module [" + sModule + "]";
return true;
}
CString sModPath, sDataPath;
CString sDesc;
bool bVersionMismatch;
@@ -760,19 +748,6 @@ bool CModules::UnloadModule(const CString& sModule, CString& sRetMsg) {
return false;
}
if (pModule->IsFake()) {
for (iterator it = begin(); it != end(); ++it) {
if (*it == pModule) {
erase(it);
sRetMsg = "Fake module [" + sMod + "] unloaded";
return true;
}
}
sRetMsg = "Fake module [" + sMod + "] not loaded.";
return false;
}
ModHandle p = pModule->GetDLL();
if (p) {
+1 -4
View File
@@ -751,7 +751,6 @@ public:
const CString& GetSavePath() const { if (!CFile::Exists(m_sSavePath)) { CDir::MakeDir(m_sSavePath); } return m_sSavePath; }
// Setters
void SetFake(bool b) { m_bFake = b; }
void SetGlobal(bool b) { m_bGlobal = b; }
void SetDescription(const CString& s) { m_sDescription = s; }
void SetModPath(const CString& s) { m_sModPath = s; }
@@ -759,7 +758,6 @@ public:
// !Setters
// Getters
bool IsFake() const { return m_bFake; }
bool IsGlobal() const { return m_bGlobal; }
const CString& GetDescription() const { return m_sDescription; }
const CString& GetArgs() const { return m_sArgs; }
@@ -779,7 +777,6 @@ public:
// !Getters
protected:
bool m_bFake;
bool m_bGlobal;
CString m_sDescription;
set<CTimer*> m_sTimers;
@@ -876,7 +873,7 @@ public:
bool OnTimerAutoJoin(CChan& Channel);
CModule* FindModule(const CString& sModule) const;
bool LoadModule(const CString& sModule, const CString& sArgs, CUser* pUser, CString& sRetMsg, bool bFake = false);
bool LoadModule(const CString& sModule, const CString& sArgs, CUser* pUser, CString& sRetMsg);
bool UnloadModule(const CString& sModule);
bool UnloadModule(const CString& sModule, CString& sRetMsg);
bool ReloadModule(const CString& sModule, const CString& sArgs, CUser* pUser, CString& sRetMsg);