mirror of
https://github.com/znc/znc.git
synced 2026-07-07 02:11:20 +02:00
Remove GLOBALMODCONSTRUCTOR
MODCONSTRUCTOR does that job just fine (now). Signed-off-by: Uli Schlachter <psychon@znc.in>
This commit is contained in:
@@ -15,7 +15,7 @@
|
||||
|
||||
class CAdminLogMod : public CModule {
|
||||
public:
|
||||
GLOBALMODCONSTRUCTOR(CAdminLogMod) {
|
||||
MODCONSTRUCTOR(CAdminLogMod) {
|
||||
openlog("znc", LOG_PID, LOG_DAEMON);
|
||||
}
|
||||
|
||||
|
||||
@@ -14,7 +14,7 @@
|
||||
|
||||
class CBlockUser : public CModule {
|
||||
public:
|
||||
GLOBALMODCONSTRUCTOR(CBlockUser) {}
|
||||
MODCONSTRUCTOR(CBlockUser) {}
|
||||
|
||||
virtual ~CBlockUser() {}
|
||||
|
||||
|
||||
@@ -15,7 +15,7 @@
|
||||
|
||||
class CSSLClientCertMod : public CModule {
|
||||
public:
|
||||
GLOBALMODCONSTRUCTOR(CSSLClientCertMod) {
|
||||
MODCONSTRUCTOR(CSSLClientCertMod) {
|
||||
AddHelpCommand();
|
||||
AddCommand("Add", static_cast<CModCommand::ModCmdFunc>(&CSSLClientCertMod::HandleAddCommand),
|
||||
"[pubkey]", "If pubkey is not provided will use the current key");
|
||||
|
||||
@@ -21,7 +21,7 @@
|
||||
class CDroproot : public CModule {
|
||||
|
||||
public:
|
||||
GLOBALMODCONSTRUCTOR(CDroproot) {
|
||||
MODCONSTRUCTOR(CDroproot) {
|
||||
}
|
||||
|
||||
virtual ~CDroproot() {
|
||||
|
||||
@@ -41,7 +41,7 @@ protected:
|
||||
|
||||
class CIMAPAuthMod : public CModule {
|
||||
public:
|
||||
GLOBALMODCONSTRUCTOR(CIMAPAuthMod) {
|
||||
MODCONSTRUCTOR(CIMAPAuthMod) {
|
||||
m_Cache.SetTTL(60000);
|
||||
m_sServer = "localhost";
|
||||
m_uPort = 143;
|
||||
|
||||
@@ -12,7 +12,7 @@
|
||||
|
||||
class CMotdFileMod : public CModule {
|
||||
public:
|
||||
GLOBALMODCONSTRUCTOR(CMotdFileMod) {}
|
||||
MODCONSTRUCTOR(CMotdFileMod) {}
|
||||
virtual ~CMotdFileMod() {}
|
||||
|
||||
virtual bool OnLoad(const CString& sArgs, CString& sMessage) {
|
||||
|
||||
@@ -11,7 +11,7 @@
|
||||
|
||||
class CNotifyConnectMod : public CModule {
|
||||
public:
|
||||
GLOBALMODCONSTRUCTOR(CNotifyConnectMod) {}
|
||||
MODCONSTRUCTOR(CNotifyConnectMod) {}
|
||||
|
||||
virtual void OnClientLogin() {
|
||||
SendAdmins(m_pUser->GetUserName() + " attached (from " + m_pClient->GetRemoteIP() + ")");
|
||||
|
||||
@@ -17,7 +17,7 @@
|
||||
|
||||
class CSASLAuthMod : public CModule {
|
||||
public:
|
||||
GLOBALMODCONSTRUCTOR(CSASLAuthMod) {
|
||||
MODCONSTRUCTOR(CSASLAuthMod) {
|
||||
m_Cache.SetTTL(60000/*ms*/);
|
||||
}
|
||||
virtual ~CSASLAuthMod() {}
|
||||
|
||||
@@ -10,7 +10,7 @@
|
||||
|
||||
class CFailToBanMod : public CModule {
|
||||
public:
|
||||
GLOBALMODCONSTRUCTOR(CFailToBanMod) {}
|
||||
MODCONSTRUCTOR(CFailToBanMod) {}
|
||||
virtual ~CFailToBanMod() {}
|
||||
|
||||
virtual bool OnLoad(const CString& sArgs, CString& sMessage) {
|
||||
|
||||
@@ -17,7 +17,7 @@ class CIdentFileModule : public CModule {
|
||||
CIRCSock *m_pIRCSock;
|
||||
|
||||
public:
|
||||
GLOBALMODCONSTRUCTOR(CIdentFileModule) {
|
||||
MODCONSTRUCTOR(CIdentFileModule) {
|
||||
AddHelpCommand();
|
||||
AddCommand("GetFile", static_cast<CModCommand::ModCmdFunc>(&CIdentFileModule::GetFile));
|
||||
AddCommand("SetFile", static_cast<CModCommand::ModCmdFunc>(&CIdentFileModule::SetFile),
|
||||
|
||||
@@ -61,7 +61,7 @@ private:
|
||||
}
|
||||
|
||||
public:
|
||||
GLOBALMODCONSTRUCTOR(CLastSeenMod) {
|
||||
MODCONSTRUCTOR(CLastSeenMod) {
|
||||
AddHelpCommand();
|
||||
AddCommand("Show", static_cast<CModCommand::ModCmdFunc>(&CLastSeenMod::ShowCommand));
|
||||
}
|
||||
|
||||
+1
-1
@@ -34,7 +34,7 @@ extern "C" {
|
||||
class CModPerl: public CModule {
|
||||
PerlInterpreter *m_pPerl;
|
||||
public:
|
||||
GLOBALMODCONSTRUCTOR(CModPerl) {
|
||||
MODCONSTRUCTOR(CModPerl) {
|
||||
m_pPerl = NULL;
|
||||
}
|
||||
|
||||
|
||||
@@ -69,7 +69,7 @@ public:
|
||||
return result;
|
||||
}
|
||||
|
||||
GLOBALMODCONSTRUCTOR(CModPython) {
|
||||
MODCONSTRUCTOR(CModPython) {
|
||||
Py_Initialize();
|
||||
m_PyFormatException = NULL;
|
||||
m_PyZNCModule = NULL;
|
||||
|
||||
@@ -25,7 +25,7 @@ class CPyModule : public CModule {
|
||||
public:
|
||||
CPyModule(const CString& sModName, const CString& sDataPath,
|
||||
PyObject* pyObj, CModule* pModPython)
|
||||
: CModule(NULL, sModName, sDataPath) {
|
||||
: CModule(NULL, NULL, sModName, sDataPath) {
|
||||
m_pyObj = pyObj;
|
||||
Py_INCREF(pyObj);
|
||||
m_pModPython = reinterpret_cast<CModPython*>(pModPython);
|
||||
|
||||
@@ -43,7 +43,7 @@ protected:
|
||||
|
||||
class CPartylineMod : public CModule {
|
||||
public:
|
||||
GLOBALMODCONSTRUCTOR(CPartylineMod) {}
|
||||
MODCONSTRUCTOR(CPartylineMod) {}
|
||||
|
||||
virtual ~CPartylineMod() {
|
||||
while (m_ssChannels.size()) {
|
||||
|
||||
@@ -53,7 +53,7 @@ inline bool FOR_EACH_MODULE_CanContinue(FOR_EACH_MODULE_Type& state, CModules::i
|
||||
|
||||
class CWebAdminMod : public CModule {
|
||||
public:
|
||||
GLOBALMODCONSTRUCTOR(CWebAdminMod) {
|
||||
MODCONSTRUCTOR(CWebAdminMod) {
|
||||
VPair vParams;
|
||||
vParams.push_back(make_pair("user", ""));
|
||||
AddSubPage(new CWebSubPage("settings", "Global Settings", CWebSubPage::F_ADMIN));
|
||||
|
||||
Reference in New Issue
Block a user