Permalink
Browse files

Fix chansaver to not rewrite the config each time a user joins a chan…

…nel on startup
  • Loading branch information...
1 parent 3be9c7a commit 7f865cb990a176ea1fec53a55ce1fef67132de8e @Adam- Adam- committed Sep 12, 2012
Showing with 2 additions and 2 deletions.
  1. +2 −2 modules/chansaver.cpp
View
@@ -59,14 +59,14 @@ class CChanSaverMod : public CModule {
}
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();
}

0 comments on commit 7f865cb

Please sign in to comment.