From 8a690170e3a9f4e7f22602596689f01050cce53a Mon Sep 17 00:00:00 2001 From: psychon Date: Sat, 2 Oct 2010 12:39:20 +0000 Subject: [PATCH] chansaver: Ignore channel key "*" There are some nets out there which display the current channel key as "*" if you are already in the channel. This means ZNC would remember the channel key as "*" and thus be unable to rejoin the channel. Bad. git-svn-id: https://znc.svn.sourceforge.net/svnroot/znc/trunk@2155 726aef4b-f618-498e-8847-2d620e286838 --- modules/chansaver.cpp | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/modules/chansaver.cpp b/modules/chansaver.cpp index 85fae722..b13b9b5c 100644 --- a/modules/chansaver.cpp +++ b/modules/chansaver.cpp @@ -46,7 +46,8 @@ public: virtual void OnMode(const CNick& OpNick, CChan& Channel, char uMode, const CString& sArg, bool bAdded, bool bNoChange) { // This is called when we join (ZNC requests the channel modes // on join) *and* when someone changes the channel keys. - if (uMode != 'k' || bNoChange || !bAdded) + // We ignore channel key "*" because of some broken nets. + if (uMode != 'k' || bNoChange || !bAdded || sArg == "*") return; Channel.SetKey(sArg);