chansaver: Add all channels to the config when this module is loaded

git-svn-id: https://znc.svn.sourceforge.net/svnroot/znc/trunk@1018 726aef4b-f618-498e-8847-2d620e286838
This commit is contained in:
psychon
2008-04-07 20:19:17 +00:00
parent e24fdab787
commit 5590307909
+15
View File
@@ -13,7 +13,22 @@
class CChanSaverMod : public CModule {
public:
MODCONSTRUCTOR(CChanSaverMod) {
const vector<CChan*>& vChans = m_pUser->GetChans();
vector<CChan*>::const_iterator it = vChans.begin();
vector<CChan*>::const_iterator end = vChans.end();
m_bWriteConf = false;
for (; it != end; it++) {
CChan *pChan = *it;
// If that channel isn't yet in the config,
// we'll have to add it...
if (!pChan->InConfig()) {
pChan->SetInConfig(true);
m_bWriteConf = true;
}
}
}
virtual ~CChanSaverMod() {