mirror of
https://github.com/znc/znc.git
synced 2026-05-09 14:54:53 +02:00
Fixed bugs while using --disable-modules
git-svn-id: https://znc.svn.sourceforge.net/svnroot/znc/trunk@254 726aef4b-f618-498e-8847-2d620e286838
This commit is contained in:
@@ -6,6 +6,10 @@
|
||||
#include "Nick.h"
|
||||
#include "Chan.h"
|
||||
|
||||
#ifndef _MODDIR_
|
||||
#define _MODDIR_ "/usr/share/znc"
|
||||
#endif
|
||||
|
||||
/////////////////// Timer ///////////////////
|
||||
CTimer::CTimer(CModule* pModule, unsigned int uInterval, unsigned int uCycles, const CString& sLabel, const CString& sDescription) : CCron() {
|
||||
SetName(sLabel);
|
||||
|
||||
@@ -6,7 +6,6 @@
|
||||
#include <vector>
|
||||
using std::vector;
|
||||
|
||||
#define VERSION 0.034
|
||||
#define MODULEDEFS(CLASS) extern "C" { CModule* Load(void* p, CUser* pUser, const CString& sModName); void Unload(CModule* pMod); double GetVersion(); } double GetVersion() { return VERSION; } CModule* Load(void* p, CUser* pUser, const CString& sModName) { return new CLASS(p, pUser, sModName); } void Unload(CModule* pMod) { if (pMod) { delete pMod; } }
|
||||
#define MODCONSTRUCTOR(CLASS) CLASS(void *pDLL, CUser* pUser, const CString& sModName) : CModule(pDLL, pUser, sModName)
|
||||
|
||||
|
||||
@@ -1,6 +1,7 @@
|
||||
#ifndef _USER_H
|
||||
#define _USER_H
|
||||
|
||||
#include "main.h"
|
||||
#ifdef _MODULES
|
||||
#include "Modules.h"
|
||||
#endif
|
||||
|
||||
@@ -2,6 +2,8 @@
|
||||
#define _MAIN_H
|
||||
|
||||
|
||||
#define VERSION 0.034
|
||||
|
||||
#ifndef CS_STRING
|
||||
#define CS_STRING CString
|
||||
#endif
|
||||
|
||||
@@ -308,6 +308,7 @@ bool CZNC::WriteNewConfig(const CString& sConfig) {
|
||||
vsLines.push_back("\tChanModes = " + sAnswer);
|
||||
}
|
||||
|
||||
#ifdef _MODULES
|
||||
set<CModInfo> ssMods;
|
||||
CModules::GetAvailableMods(ssMods, this);
|
||||
|
||||
@@ -332,6 +333,7 @@ bool CZNC::WriteNewConfig(const CString& sConfig) {
|
||||
}
|
||||
}
|
||||
}
|
||||
#endif
|
||||
|
||||
vsLines.push_back("");
|
||||
CUtils::PrintMessage("");
|
||||
|
||||
Reference in New Issue
Block a user