mirror of
https://github.com/znc/znc.git
synced 2026-05-18 07:15:54 +02:00
Error if a channel is defined more than once
git-svn-id: https://znc.svn.sourceforge.net/svnroot/znc/trunk@944 726aef4b-f618-498e-8847-2d620e286838
This commit is contained in:
@@ -845,7 +845,14 @@ bool CZNC::ParseConfig(const CString& sConfig) {
|
||||
if (pUser) {
|
||||
if (pChan) {
|
||||
if (sTag.CaseCmp("Chan") == 0) {
|
||||
pUser->AddChan(pChan);
|
||||
// Save the channel name, because AddChan
|
||||
// deletes the CChannel*, if adding fails
|
||||
sTag = pChan->GetName(); /* FIXME */
|
||||
if (!pUser->AddChan(pChan)) {
|
||||
CUtils::PrintError("Channel [" + sTag + "] defined more than once");
|
||||
return false;
|
||||
}
|
||||
sTag.clear();
|
||||
pChan = NULL;
|
||||
continue;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user