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
This commit is contained in:
psychon
2010-10-02 12:39:20 +00:00
parent 0ca947122d
commit 8a690170e3

View File

@@ -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);