]> jfr.im git - irc/rizon/znc.git/commitdiff
awaynick: Disable KeepNick on load instead of failing to load
authorpsychon <redacted>
Tue, 22 Jul 2008 08:39:18 +0000 (08:39 +0000)
committerpsychon <redacted>
Tue, 22 Jul 2008 08:39:18 +0000 (08:39 +0000)
This should make someone in #znc really happy. :P
This is based on a patch from SilverLeo.

git-svn-id: https://znc.svn.sourceforge.net/svnroot/znc/trunk@1142 726aef4b-f618-498e-8847-2d620e286838

modules/awaynick.cpp

index 3573544fd89477b6b7318af4e532e32cf0ca8642..16821f1750970416eaf88eedcddefe8255e46c3c 100644 (file)
@@ -60,9 +60,11 @@ public:
                SetNV("nick", m_sFormat);
 
                if (m_pUser->GetKeepNick()) {
-                       sMessage = "You have KeepNick enabled. "
-                               "This won't work together with awaynick.";
-                       return false;
+                       sMessage = "KeepNick disabled";
+                       PutModule("You have KeepNick enabled. "
+                               "This won't work together with awaynick.");
+                       PutModule("Disabling KeepNick for you...");
+                       m_pUser->SetKeepNick(false);
                }
 
                return true;