mirror of
https://github.com/znc/znc.git
synced 2026-07-03 00:11:59 +02:00
Awaynick now saves its latest setting and restores it on reload
git-svn-id: https://znc.svn.sourceforge.net/svnroot/znc/trunk@877 726aef4b-f618-498e-8847-2d620e286838
This commit is contained in:
@@ -52,12 +52,17 @@ public:
|
||||
MODCONSTRUCTOR(CAwayNickMod) {}
|
||||
|
||||
virtual bool OnLoad(const CString& sArgs, CString& sMessage) {
|
||||
m_sFormat = sArgs;
|
||||
if (!sArgs.empty())
|
||||
m_sFormat = sArgs;
|
||||
else
|
||||
m_sFormat = GetNV("nick");
|
||||
|
||||
if (m_sFormat.empty()) {
|
||||
m_sFormat = "zz_%nick%";
|
||||
}
|
||||
|
||||
SetNV("nick", m_sFormat);
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
@@ -111,6 +116,7 @@ public:
|
||||
|
||||
if (!sFormat.empty()) {
|
||||
m_sFormat = sFormat;
|
||||
SetNV("nick", m_sFormat);
|
||||
}
|
||||
|
||||
if (m_pUser) {
|
||||
|
||||
Reference in New Issue
Block a user