mirror of
https://github.com/znc/znc.git
synced 2026-05-03 12:02:30 +02:00
Add warning header to znc.conf
git-svn-id: https://znc.svn.sourceforge.net/svnroot/znc/trunk@2218 726aef4b-f618-498e-8847-2d620e286838
This commit is contained in:
12
znc.cpp
12
znc.cpp
@@ -525,6 +525,8 @@ bool CZNC::WriteConfig() {
|
||||
return false;
|
||||
}
|
||||
|
||||
m_LockFile.Write(MakeConfigHeader() + "\n");
|
||||
|
||||
GLOBALMODULECALL(OnWriteConfig(m_LockFile), NULL, NULL, return false);
|
||||
|
||||
m_LockFile.Write("AnonIPLimit = " + CString(m_uiAnonIPLimit) + "\n");
|
||||
@@ -633,9 +635,19 @@ bool CZNC::WriteConfig() {
|
||||
return true;
|
||||
}
|
||||
|
||||
CString CZNC::MakeConfigHeader() {
|
||||
return
|
||||
"// WARNING\n"
|
||||
"//\n"
|
||||
"// Do NOT edit this file while ZNC is running!\n"
|
||||
"// Use webadmin or *admin instead.\n";
|
||||
}
|
||||
|
||||
bool CZNC::WriteNewConfig(const CString& sConfigFile) {
|
||||
CString sAnswer, sUser;
|
||||
VCString vsLines;
|
||||
|
||||
vsLines.push_back(MakeConfigHeader());
|
||||
|
||||
m_sConfigFile = ExpandConfigPath(sConfigFile);
|
||||
CUtils::PrintMessage("Building new config");
|
||||
|
||||
Reference in New Issue
Block a user