mirror of
https://github.com/znc/znc.git
synced 2026-08-07 17:33:34 +02:00
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:
@@ -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() {
|
||||
|
||||
Reference in New Issue
Block a user