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:
psychon
2007-11-17 22:44:34 +00:00
parent 5412fd1494
commit b0e84a0605
+7 -1
View File
@@ -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) {