chansaver: Save channel keys (+k) again, core doesn't do it anymore on its own

git-svn-id: https://znc.svn.sourceforge.net/svnroot/znc/trunk@1190 726aef4b-f618-498e-8847-2d620e286838
This commit is contained in:
psychon
2008-09-05 19:46:43 +00:00
parent 219ae6a572
commit df27598832
+10 -9
View File
@@ -40,18 +40,19 @@ public:
m_bWriteConf = false;
}
if (sLine.Token(1) == "324" && sLine.Token(4).find("k") != CString::npos) {
CChan* pChan = m_pUser->FindChan(sLine.Token(3));
if (pChan) {
pChan->SetInConfig(true);
m_bWriteConf = true;
}
}
return CONTINUE;
}
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)
return;
Channel.SetKey(sArg);
m_bWriteConf = true;
}
virtual void OnJoin(const CNick& Nick, CChan& Channel) {
if (Nick.GetNick() == m_pUser->GetIRCNick().GetNick()) {
Channel.SetInConfig(true);