From 496e164bef8b0ed76bb4b6bc468f5431150ca900 Mon Sep 17 00:00:00 2001 From: psychon Date: Sun, 2 Dec 2007 09:23:49 +0000 Subject: [PATCH] Let autoattach save and reload its settings when it's loaded git-svn-id: https://znc.svn.sourceforge.net/svnroot/znc/trunk@889 726aef4b-f618-498e-8847-2d620e286838 --- modules/autoattach.cpp | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/modules/autoattach.cpp b/modules/autoattach.cpp index 9c1b9cf2..0f234a16 100644 --- a/modules/autoattach.cpp +++ b/modules/autoattach.cpp @@ -31,6 +31,12 @@ public: sChan = sArgs.Token(a++); } + // Load out saved settings, ignore errors + MCString::iterator it; + for (it = BeginNV(); it != EndNV(); it++) { + Add(it->first); + } + return true; } @@ -135,6 +141,8 @@ public: m_vsChans.push_back(sChan); } + SetNV(sChan, ""); + return true; } @@ -171,6 +179,8 @@ public: m_vsChans.erase(it); } + DelNV(sChan); + return true; }