mirror of
https://github.com/znc/znc.git
synced 2026-03-28 17:42:41 +01:00
Fix chansaver to not rewrite the config each time a user joins a channel on startup
This commit is contained in:
@@ -59,14 +59,14 @@ public:
|
||||
}
|
||||
|
||||
virtual void OnJoin(const CNick& Nick, CChan& Channel) {
|
||||
if (Nick.GetNick() == m_pNetwork->GetIRCNick().GetNick()) {
|
||||
if (Nick.GetNick() == m_pNetwork->GetIRCNick().GetNick() && !Channel.InConfig()) {
|
||||
Channel.SetInConfig(true);
|
||||
CZNC::Get().WriteConfig();
|
||||
}
|
||||
}
|
||||
|
||||
virtual void OnPart(const CNick& Nick, CChan& Channel, const CString& sMessage) {
|
||||
if (Nick.GetNick() == m_pNetwork->GetIRCNick().GetNick()) {
|
||||
if (Nick.GetNick() == m_pNetwork->GetIRCNick().GetNick() && Channel.InConfig()) {
|
||||
Channel.SetInConfig(false);
|
||||
CZNC::Get().WriteConfig();
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user