Skip to content

Commit

Permalink
Fix presense and help of module arguments.
Browse files Browse the repository at this point in the history
See github issue #192
  • Loading branch information
DarthGandalf committed Jul 17, 2012
1 parent 373490f commit fca5eeb
Show file tree
Hide file tree
Showing 21 changed files with 77 additions and 3 deletions.
2 changes: 2 additions & 0 deletions modules/autoattach.cpp
Expand Up @@ -248,6 +248,8 @@ class CChanAttach : public CModule {

template<> void TModInfo<CChanAttach>(CModInfo& Info) {
Info.SetWikiPage("autoattach");
Info.SetHasArgs(true);
Info.SetArgsHelpText("List of channel masks and channel masks with ! before them.");
}

USERMODULEDEFS(CChanAttach, "Reattaches you to channels on activity.")
2 changes: 2 additions & 0 deletions modules/autocycle.cpp
Expand Up @@ -237,6 +237,8 @@ class CAutoCycleMod : public CModule {

template<> void TModInfo<CAutoCycleMod>(CModInfo& Info) {
Info.SetWikiPage("autocycle");
Info.SetHasArgs(true);
Info.SetArgsHelpText("List of channel masks and channel masks with ! before them.");
}

USERMODULEDEFS(CAutoCycleMod, "Rejoins channels to gain Op if you're the only user left")
6 changes: 6 additions & 0 deletions modules/autovoice.cpp
Expand Up @@ -275,4 +275,10 @@ class CAutoVoiceMod : public CModule {
map<CString, CAutoVoiceUser*> m_msUsers;
};

template<> void TModInfo<CAutoVoiceMod>(CModInfo& Info) {
Info.SetWikiPage("autovoice");
Info.SetHasArgs(true);
Info.SetArgsHelpText("Each argument is either a channel you want autovoice for (which can include wildcards) or, if it starts with !, it is an exception for autovoice.");
}

NETWORKMODULEDEFS(CAutoVoiceMod, "Auto voice the good guys")
6 changes: 6 additions & 0 deletions modules/awaystore.cpp
Expand Up @@ -480,5 +480,11 @@ void CAwayJob::RunJob()
}
}

template<> void TModInfo<CAway>(CModInfo& Info) {
Info.SetWikiPage("awaystore");
Info.SetHasArgs(true);
Info.SetArgsHelpText("[ -notimer | -timer N ] [ passw0rd ]. N is number of seconds, 600 by default.");
}

NETWORKMODULEDEFS(CAway, "Adds auto-away with logging, useful when you use ZNC from different locations");

4 changes: 4 additions & 0 deletions modules/block_motd.cpp
Expand Up @@ -30,4 +30,8 @@ class CBlockMotd : public CModule {
}
};

template<> void TModInfo<CBlockMotd>(CModInfo& Info) {
Info.SetWikiPage("block_motd");
}

USERMODULEDEFS(CBlockMotd, "Block the MOTD from IRC so it's not sent to your client(s).")
4 changes: 3 additions & 1 deletion modules/bouncedcc.cpp
Expand Up @@ -449,7 +449,9 @@ unsigned short CDCCBounce::DCCRequest(const CString& sNick, unsigned long uLongI
return uListenPort;
}


template<> void TModInfo<CBounceDCCMod>(CModInfo& Info) {
Info.SetWikiPage("bouncedcc");
}

USERMODULEDEFS(CBounceDCCMod, "Bounces DCC transfers through ZNC instead of sending them directly to the user. ")

4 changes: 4 additions & 0 deletions modules/clearbufferonmsg.cpp
Expand Up @@ -63,4 +63,8 @@ class CClearBufferOnMsgMod : public CModule {
}
};

template<> void TModInfo<CClearBufferOnMsgMod>(CModInfo& Info) {
Info.SetWikiPage("clearbufferonmsg");
}

USERMODULEDEFS(CClearBufferOnMsgMod, "Clear all channel buffers whenever the user does something")
6 changes: 6 additions & 0 deletions modules/ctcpflood.cpp
Expand Up @@ -113,4 +113,10 @@ class CCtcpFloodMod : public CModule {
unsigned int m_iThresholdMsgs;
};

template<> void TModInfo<CCtcpFloodMod>(CModInfo& Info) {
Info.SetWikiPage("ctcpflood");
Info.SetHasArgs(true);
Info.SetArgsHelpText("This user module takes none to two arguments. The first argument is the number of lines after which the flood-protection is triggered. The second argument is the time (s) to in which the number of lines is reached. The default setting is 4 CTCPs in 2 seconds");
}

USERMODULEDEFS(CCtcpFloodMod, "Don't forward CTCP floods to clients")
4 changes: 3 additions & 1 deletion modules/cyrusauth.cpp
Expand Up @@ -210,7 +210,9 @@ class CSASLAuthMod : public CModule {
};

template<> void TModInfo<CSASLAuthMod>(CModInfo& Info) {
Info.SetWikiPage("saslauth");
Info.SetWikiPage("cyrusauth");
Info.SetHasArgs(true);
Info.SetArgsHelpText("This global module takes up to two arguments - the methods of authentication - auxprop and saslauthd");
}

GLOBALMODULEDEFS(CSASLAuthMod, "Allow users to authenticate via SASL password verification method")
4 changes: 4 additions & 0 deletions modules/dcc.cpp
Expand Up @@ -471,5 +471,9 @@ bool CDCCSock::Seek(unsigned int uPos) {
return false;
}

template<> void TModInfo<CDCCMod>(CModInfo& Info) {
Info.SetWikiPage("dcc");
}

USERMODULEDEFS(CDCCMod, "This module allows you to transfer files to and from ZNC")

6 changes: 6 additions & 0 deletions modules/flooddetach.cpp
Expand Up @@ -187,4 +187,10 @@ class CFloodDetachMod : public CModule {
unsigned int m_iThresholdMsgs;
};

template<> void TModInfo<CFloodDetachMod>(CModInfo& Info) {
Info.SetWikiPage("flooddetach");
Info.SetHasArgs(true);
Info.SetArgsHelpText("This user module takes up to two arguments. Arguments are msgs and secs numbers.");
}

USERMODULEDEFS(CFloodDetachMod, "Detach channels when flooded")
6 changes: 6 additions & 0 deletions modules/imapauth.cpp
Expand Up @@ -151,4 +151,10 @@ void CIMAPSock::ReadLine(const CString& sLine) {
}
}

template<> void TModInfo<CIMAPAuthMod>(CModInfo& Info) {
Info.SetWikiPage("imapauth");
Info.SetHasArgs(true);
Info.SetArgsHelpText("[ server [+]port [ UserFormatString ] ]");
}

GLOBALMODULEDEFS(CIMAPAuthMod, "Allow users to authenticate via imap")
4 changes: 4 additions & 0 deletions modules/listsockets.cpp
Expand Up @@ -243,5 +243,9 @@ class CListSockets : public CModule {

};

template<> void TModInfo<CListSockets>(CModInfo& Info) {
Info.SetWikiPage("listsockets");
}

USERMODULEDEFS(CListSockets, "List active sockets")

2 changes: 2 additions & 0 deletions modules/notes.cpp
Expand Up @@ -214,6 +214,8 @@ class CNotesMod : public CModule {

template<> void TModInfo<CNotesMod>(CModInfo& Info) {
Info.SetWikiPage("notes");
Info.SetHasArgs(true);
Info.SetArgsHelpText("This user module takes up to one arguments. It can be -disableNotesOnLogin not to show notes upon client login");
}

USERMODULEDEFS(CNotesMod, "Keep and replay notes")
2 changes: 1 addition & 1 deletion modules/sample.cpp
Expand Up @@ -244,7 +244,7 @@ class CSampleMod : public CModule {
template<> void TModInfo<CSampleMod>(CModInfo& Info) {
Info.SetWikiPage("sample");
Info.SetHasArgs(true);
Info.SetArgsHelpText("Please describe the arguments used by your module in one or two sentences.");
Info.SetArgsHelpText("Description of module arguments goes here.");
}

USERMODULEDEFS(CSampleMod, "To be used as a sample for writing modules")
Expand Down
4 changes: 4 additions & 0 deletions modules/sasl.cpp
Expand Up @@ -425,4 +425,8 @@ class CSASLMod : public CModule {
bool m_bAuthenticated;
};

template<> void TModInfo<CSASLMod>(CModInfo& Info) {
Info.SetWikiPage("sasl");
}

NETWORKMODULEDEFS(CSASLMod, "Adds support for sasl authentication capability to authenticate to an IRC server")
2 changes: 2 additions & 0 deletions modules/savebuff.cpp
Expand Up @@ -360,6 +360,8 @@ void CSaveBuffJob::RunJob()

template<> void TModInfo<CSaveBuff>(CModInfo& Info) {
Info.SetWikiPage("savebuff");
Info.SetHasArgs(true);
Info.SetArgsHelpText("This user module takes up to one arguments. Either --ask-pass or the password itself (which may contain spaces) or nothing");
}

NETWORKMODULEDEFS(CSaveBuff, "Stores channel buffers to disk, encrypted")
Expand Down
2 changes: 2 additions & 0 deletions modules/schat.cpp
Expand Up @@ -467,6 +467,8 @@ void CRemMarkerJob::RunJob()

template<> void TModInfo<CSChat>(CModInfo& Info) {
Info.SetWikiPage("schat");
Info.SetHasArgs(true);
Info.SetArgsHelpText("Path to .pem file, if differs from main ZNC's one");
}

NETWORKMODULEDEFS(CSChat, "Secure cross platform (:P) chat system")
Expand Down
4 changes: 4 additions & 0 deletions modules/send_raw.cpp
Expand Up @@ -126,4 +126,8 @@ class CSendRaw_Mod: public CModule {
}
};

template<> void TModInfo<CSendRaw_Mod>(CModInfo& Info) {
Info.SetWikiPage("send_raw");
}

USERMODULEDEFS(CSendRaw_Mod, "Lets you send some raw IRC lines as/to someone else")
4 changes: 4 additions & 0 deletions modules/shell.cpp
Expand Up @@ -127,6 +127,10 @@ void CShellSock::Disconnected() {
m_pParent->SetClient(NULL);
}

template<> void TModInfo<CShellMod>(CModInfo& Info) {
Info.SetWikiPage("shell");
}

#ifdef MOD_SHELL_ALLOW_EVERYONE
USERMODULEDEFS(CShellMod, "Gives shell access")
#else
Expand Down
2 changes: 2 additions & 0 deletions modules/stickychan.cpp
Expand Up @@ -189,6 +189,8 @@ bool CStickyChan::OnLoad(const CString& sArgs, CString& sMessage)

template<> void TModInfo<CStickyChan>(CModInfo& Info) {
Info.SetWikiPage("stickychan");
Info.SetHasArgs(true);
Info.SetArgsHelpText("List of channels, separated by comma.");
}

NETWORKMODULEDEFS(CStickyChan, "configless sticky chans, keeps you there very stickily even")

0 comments on commit fca5eeb

Please sign in to comment.