mirror of
https://github.com/znc/znc.git
synced 2026-05-02 03:22:33 +02:00
Added option for AutoCycle
git-svn-id: https://znc.svn.sourceforge.net/svnroot/znc/trunk@31 726aef4b-f618-498e-8847-2d620e286838
This commit is contained in:
10
znc.cpp
10
znc.cpp
@@ -227,6 +227,7 @@ bool CZNC::ParseConfig(const string& sConfigFile) {
|
||||
|
||||
string sLine;
|
||||
bool bCommented = false; // support for /**/ style comments
|
||||
bool bAutoCycle = true;
|
||||
CUser* pUser = NULL; // Used to keep track of which user block we are in
|
||||
CChan* pChan = NULL; // Used to keep track of which chan block we are in
|
||||
|
||||
@@ -298,6 +299,8 @@ bool CZNC::ParseConfig(const string& sConfigFile) {
|
||||
}
|
||||
|
||||
pUser = new CUser(sValue, this);
|
||||
bAutoCycle = true;
|
||||
|
||||
if (!sStatusPrefix.empty()) {
|
||||
if (!pUser->SetStatusPrefix(sStatusPrefix)) {
|
||||
cerr << "Invalid StatusPrefix [" + sStatusPrefix + "] Must be 1-5 chars, no spaces." << endl;
|
||||
@@ -317,6 +320,7 @@ bool CZNC::ParseConfig(const string& sConfigFile) {
|
||||
}
|
||||
|
||||
pChan = new CChan(sValue, pUser);
|
||||
pChan->SetAutoCycle(bAutoCycle);
|
||||
continue;
|
||||
}
|
||||
}
|
||||
@@ -336,6 +340,9 @@ bool CZNC::ParseConfig(const string& sConfigFile) {
|
||||
} else if (strcasecmp(sName.c_str(), "KeepBuffer") == 0) {
|
||||
pChan->SetKeepBuffer((strcasecmp(sValue.c_str(), "true") == 0));
|
||||
continue;
|
||||
} else if (strcasecmp(sName.c_str(), "AutoCycle") == 0) {
|
||||
pChan->SetAutoCycle((strcasecmp(sValue.c_str(), "true") == 0));
|
||||
continue;
|
||||
} else if (strcasecmp(sName.c_str(), "Key") == 0) {
|
||||
pChan->SetKey(sValue);
|
||||
continue;
|
||||
@@ -359,6 +366,9 @@ bool CZNC::ParseConfig(const string& sConfigFile) {
|
||||
pUser->SetPass(sValue, false);
|
||||
}
|
||||
|
||||
continue;
|
||||
} else if (strcasecmp(sName.c_str(), "AutoCycle") == 0) {
|
||||
bAutoCycle = (strcasecmp(sValue.c_str(), "true") == 0);
|
||||
continue;
|
||||
} else if (strcasecmp(sName.c_str(), "Ident") == 0) {
|
||||
pUser->SetIdent(sValue);
|
||||
|
||||
Reference in New Issue
Block a user