mirror of
https://github.com/znc/znc.git
synced 2026-07-03 00:11:59 +02:00
Add a option to the notes module so that you can prevent it from sending you notes when you connect
This commit is contained in:
+7
-2
@@ -18,6 +18,8 @@
|
||||
using std::stringstream;
|
||||
|
||||
class CNotesMod : public CModule {
|
||||
bool bShowNotesOnLogin;
|
||||
|
||||
void ListCommand(const CString &sLine) {
|
||||
ListNotes();
|
||||
}
|
||||
@@ -82,14 +84,17 @@ public:
|
||||
|
||||
virtual ~CNotesMod() {}
|
||||
|
||||
virtual bool OnLoad(const CString& sArgStr, CString& sMessage) {
|
||||
virtual bool OnLoad(const CString& sArgs, CString& sMessage) {
|
||||
bShowNotesOnLogin = !sArgs.Equals("-disableNotesOnLogin");
|
||||
return true;
|
||||
}
|
||||
|
||||
virtual CString GetWebMenuTitle() { return "Notes"; }
|
||||
|
||||
virtual void OnClientLogin() {
|
||||
ListNotes(true);
|
||||
if (bShowNotesOnLogin) {
|
||||
ListNotes(true);
|
||||
}
|
||||
}
|
||||
|
||||
virtual EModRet OnUserRaw(CString& sLine) {
|
||||
|
||||
Reference in New Issue
Block a user