mirror of
https://github.com/znc/znc.git
synced 2026-07-06 01:41:12 +02:00
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:
+10
-9
@@ -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);
|
||||
|
||||
Reference in New Issue
Block a user