From cd94702b927c049384d111eafa4d79aa0a1dbf6f Mon Sep 17 00:00:00 2001 From: J-P Nurmi Date: Wed, 8 Oct 2014 23:35:06 +0200 Subject: [PATCH] Write disabled status to chan config --- src/Chan.cpp | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/src/Chan.cpp b/src/Chan.cpp index befa225c..5dea036e 100644 --- a/src/Chan.cpp +++ b/src/Chan.cpp @@ -53,6 +53,9 @@ CChan::CChan(const CString& sName, CIRCNetwork* pNetwork, bool bInConfig, CConfi SetAutoClearChanBuffer(!sValue.ToBool()); // XXX Compatibility crap, added in 0.207 if (pConfig->FindStringEntry("detached", sValue)) SetDetached(sValue.ToBool()); + if (pConfig->FindStringEntry("disabled", sValue)) + if (sValue.ToBool()) + Disable(); if (pConfig->FindStringEntry("autocycle", sValue)) if (sValue.Equals("true")) CUtils::PrintError("WARNING: AutoCycle has been removed, instead try -> LoadModule = autocycle " + sName); @@ -89,6 +92,8 @@ CConfig CChan::ToConfig() const { config.AddKeyValuePair("AutoClearChanBuffer", CString(AutoClearChanBuffer())); if (IsDetached()) config.AddKeyValuePair("Detached", "true"); + if (IsDisabled()) + config.AddKeyValuePair("Disabled", "true"); if (!GetKey().empty()) config.AddKeyValuePair("Key", GetKey()); if (!GetDefaultModes().empty())