mirror of
https://github.com/znc/znc.git
synced 2026-08-07 01:13:25 +02:00
Mods are network mods by default.
Network modules are the simplest ones.
This commit is contained in:
+11
-8
@@ -29,7 +29,6 @@ class CModule;
|
||||
class CModInfo;
|
||||
// !Forward Declarations
|
||||
|
||||
// User Module Macros
|
||||
#ifdef REQUIRESSL
|
||||
#ifndef HAVE_LIBSSL
|
||||
#error -
|
||||
@@ -91,13 +90,9 @@ template<class M> CModule* TModLoad(ModHandle p, CUser* pUser,
|
||||
const CString& sModPath) \
|
||||
: CModule(pDLL, pUser, pNetwork, sModName, sModPath)
|
||||
|
||||
/** At the end of your source file, you must call this macro in global context.
|
||||
* It defines some static functions which ZNC needs to load this module.
|
||||
* @param CLASS The name of your module's class.
|
||||
* @param DESCRIPTION A short description of your module.
|
||||
* @see For global modules you need GLOBALMODULEDEFS.
|
||||
*/
|
||||
#define MODULEDEFS(CLASS, DESCRIPTION) \
|
||||
// User Module Macros
|
||||
/** This works exactly like MODULEDEFS, but for user modules. */
|
||||
#define USERMODULEDEFS(CLASS, DESCRIPTION) \
|
||||
MODCOMMONDEFS(CLASS, DESCRIPTION, CModInfo::UserModule)
|
||||
// !User Module Macros
|
||||
|
||||
@@ -113,6 +108,14 @@ template<class M> CModule* TModLoad(ModHandle p, CUser* pUser,
|
||||
MODCOMMONDEFS(CLASS, DESCRIPTION, CModInfo::NetworkModule)
|
||||
// !Network Module Macros
|
||||
|
||||
/** At the end of your source file, you must call this macro in global context.
|
||||
* It defines some static functions which ZNC needs to load this module.
|
||||
* By default the module will be a network module.
|
||||
* @param CLASS The name of your module's class.
|
||||
* @param DESCRIPTION A short description of your module.
|
||||
*/
|
||||
#define MODULEDEFS(CLASS, DESCRIPTION) NETWORKMODULEDEFS(CLASS, DESCRIPTION)
|
||||
|
||||
// Forward Declarations
|
||||
class CZNC;
|
||||
class CUser;
|
||||
|
||||
+1
-1
@@ -987,4 +987,4 @@ template<> void TModInfo<CAdminMod>(CModInfo& Info) {
|
||||
Info.SetWikiPage("admin");
|
||||
}
|
||||
|
||||
MODULEDEFS(CAdminMod, "Dynamic configuration of users/settings through IRC. Allows editing only yourself if you're not ZNC admin.")
|
||||
USERMODULEDEFS(CAdminMod, "Dynamic configuration of users/settings through IRC. Allows editing only yourself if you're not ZNC admin.")
|
||||
|
||||
@@ -250,4 +250,4 @@ template<> void TModInfo<CChanAttach>(CModInfo& Info) {
|
||||
Info.SetWikiPage("autoattach");
|
||||
}
|
||||
|
||||
MODULEDEFS(CChanAttach, "Reattaches you to channels on activity.")
|
||||
USERMODULEDEFS(CChanAttach, "Reattaches you to channels on activity.")
|
||||
|
||||
@@ -93,5 +93,5 @@ template<> void TModInfo<CAutoReplyMod>(CModInfo& Info) {
|
||||
Info.AddType(CModInfo::NetworkModule);
|
||||
}
|
||||
|
||||
MODULEDEFS(CAutoReplyMod, "Reply to queries when you are away")
|
||||
USERMODULEDEFS(CAutoReplyMod, "Reply to queries when you are away")
|
||||
|
||||
|
||||
@@ -451,5 +451,5 @@ unsigned short CDCCBounce::DCCRequest(const CString& sNick, unsigned long uLongI
|
||||
|
||||
|
||||
|
||||
MODULEDEFS(CBounceDCCMod, "Bounces DCC transfers through ZNC instead of sending them directly to the user. ")
|
||||
USERMODULEDEFS(CBounceDCCMod, "Bounces DCC transfers through ZNC instead of sending them directly to the user. ")
|
||||
|
||||
|
||||
@@ -68,5 +68,5 @@ template<> void TModInfo<CBuffExtras>(CModInfo& Info) {
|
||||
Info.SetWikiPage("buffextras");
|
||||
}
|
||||
|
||||
MODULEDEFS(CBuffExtras, "Add joins, parts etc. to the playback buffer")
|
||||
USERMODULEDEFS(CBuffExtras, "Add joins, parts etc. to the playback buffer")
|
||||
|
||||
|
||||
+1
-1
@@ -90,4 +90,4 @@ template<> void TModInfo<CCertMod>(CModInfo& Info) {
|
||||
Info.SetWikiPage("cert");
|
||||
}
|
||||
|
||||
MODULEDEFS(CCertMod, "Use a ssl certificate to connect to a server")
|
||||
USERMODULEDEFS(CCertMod, "Use a ssl certificate to connect to a server")
|
||||
|
||||
@@ -78,4 +78,4 @@ template<> void TModInfo<CChanSaverMod>(CModInfo& Info) {
|
||||
Info.SetWikiPage("chansaver");
|
||||
}
|
||||
|
||||
MODULEDEFS(CChanSaverMod, "Keep config up-to-date when user joins/parts")
|
||||
USERMODULEDEFS(CChanSaverMod, "Keep config up-to-date when user joins/parts")
|
||||
|
||||
@@ -106,5 +106,5 @@ template<> void TModInfo<CClientNotifyMod>(CModInfo& Info) {
|
||||
Info.SetWikiPage("clientnotify");
|
||||
}
|
||||
|
||||
MODULEDEFS(CClientNotifyMod, "Notifies you when another IRC client logs into or out of your account. Configurable.")
|
||||
USERMODULEDEFS(CClientNotifyMod, "Notifies you when another IRC client logs into or out of your account. Configurable.")
|
||||
|
||||
|
||||
@@ -33,4 +33,4 @@ template<> void TModInfo<CKickClientOnIRCDisconnect>(CModInfo& Info) {
|
||||
Info.SetWikiPage("disconkick");
|
||||
}
|
||||
|
||||
MODULEDEFS(CKickClientOnIRCDisconnect, "Kicks the client from all channels when the connection to the IRC server is lost")
|
||||
USERMODULEDEFS(CKickClientOnIRCDisconnect, "Kicks the client from all channels when the connection to the IRC server is lost")
|
||||
|
||||
@@ -239,4 +239,4 @@ template<> void TModInfo<CAutoCycleMod>(CModInfo& Info) {
|
||||
Info.SetWikiPage("autocycle");
|
||||
}
|
||||
|
||||
MODULEDEFS(CAutoCycleMod, "Rejoins channels to gain Op if you're the only user left")
|
||||
USERMODULEDEFS(CAutoCycleMod, "Rejoins channels to gain Op if you're the only user left")
|
||||
|
||||
@@ -30,4 +30,4 @@ public:
|
||||
}
|
||||
};
|
||||
|
||||
MODULEDEFS(CBlockMotd, "Block the MOTD from IRC so it's not sent to your client(s).")
|
||||
USERMODULEDEFS(CBlockMotd, "Block the MOTD from IRC so it's not sent to your client(s).")
|
||||
|
||||
@@ -244,4 +244,4 @@ public:
|
||||
}
|
||||
};
|
||||
|
||||
MODULEDEFS(CCharsetMod, "Normalizes character encodings.")
|
||||
USERMODULEDEFS(CCharsetMod, "Normalizes character encodings.")
|
||||
|
||||
@@ -63,4 +63,4 @@ public:
|
||||
}
|
||||
};
|
||||
|
||||
MODULEDEFS(CClearBufferOnMsgMod, "Clear all channel buffers whenever the user does something")
|
||||
USERMODULEDEFS(CClearBufferOnMsgMod, "Clear all channel buffers whenever the user does something")
|
||||
|
||||
@@ -113,4 +113,4 @@ private:
|
||||
unsigned int m_iThresholdMsgs;
|
||||
};
|
||||
|
||||
MODULEDEFS(CCtcpFloodMod, "Don't forward CTCP floods to clients")
|
||||
USERMODULEDEFS(CCtcpFloodMod, "Don't forward CTCP floods to clients")
|
||||
|
||||
@@ -471,5 +471,5 @@ bool CDCCSock::Seek(unsigned int uPos) {
|
||||
return false;
|
||||
}
|
||||
|
||||
MODULEDEFS(CDCCMod, "This module allows you to transfer files to and from ZNC")
|
||||
USERMODULEDEFS(CDCCMod, "This module allows you to transfer files to and from ZNC")
|
||||
|
||||
|
||||
@@ -249,5 +249,5 @@ void CEmailJob::RunJob()
|
||||
CEmail *p = (CEmail *)m_pModule;
|
||||
p->StartParser();
|
||||
}
|
||||
MODULEDEFS(CEmail, "Monitors Email activity on local disk /var/mail/user")
|
||||
USERMODULEDEFS(CEmail, "Monitors Email activity on local disk /var/mail/user")
|
||||
|
||||
|
||||
@@ -187,4 +187,4 @@ private:
|
||||
unsigned int m_iThresholdMsgs;
|
||||
};
|
||||
|
||||
MODULEDEFS(CFloodDetachMod, "Detach channels when flooded")
|
||||
USERMODULEDEFS(CFloodDetachMod, "Detach channels when flooded")
|
||||
|
||||
@@ -257,5 +257,5 @@ public:
|
||||
}
|
||||
};
|
||||
|
||||
MODULEDEFS(CListSockets, "List active sockets")
|
||||
USERMODULEDEFS(CListSockets, "List active sockets")
|
||||
|
||||
|
||||
@@ -119,4 +119,4 @@ public:
|
||||
}
|
||||
};
|
||||
|
||||
MODULEDEFS(CSendRaw_Mod, "Lets you send some raw IRC lines as/to someone else")
|
||||
USERMODULEDEFS(CSendRaw_Mod, "Lets you send some raw IRC lines as/to someone else")
|
||||
|
||||
@@ -127,5 +127,5 @@ void CShellSock::Disconnected() {
|
||||
m_pParent->SetClient(NULL);
|
||||
}
|
||||
|
||||
MODULEDEFS(CShellMod, "Gives shell access")
|
||||
USERMODULEDEFS(CShellMod, "Gives shell access")
|
||||
|
||||
|
||||
+1
-1
@@ -290,4 +290,4 @@ template<> void TModInfo<CLogMod>(CModInfo& Info) {
|
||||
Info.AddType(CModInfo::GlobalModule);
|
||||
}
|
||||
|
||||
MODULEDEFS(CLogMod, "Write IRC logs")
|
||||
USERMODULEDEFS(CLogMod, "Write IRC logs")
|
||||
|
||||
+1
-1
@@ -216,4 +216,4 @@ template<> void TModInfo<CNotesMod>(CModInfo& Info) {
|
||||
Info.SetWikiPage("notes");
|
||||
}
|
||||
|
||||
MODULEDEFS(CNotesMod, "Keep and replay notes")
|
||||
USERMODULEDEFS(CNotesMod, "Keep and replay notes")
|
||||
|
||||
+1
-1
@@ -245,5 +245,5 @@ template<> void TModInfo<CSampleMod>(CModInfo& Info) {
|
||||
Info.SetWikiPage("sample");
|
||||
}
|
||||
|
||||
MODULEDEFS(CSampleMod, "To be used as a sample for writing modules")
|
||||
USERMODULEDEFS(CSampleMod, "To be used as a sample for writing modules")
|
||||
|
||||
|
||||
Reference in New Issue
Block a user