From: <dar...@us...> - 2010-12-30 18:29:22
|
Revision: 2218 http://znc.svn.sourceforge.net/znc/?rev=2218&view=rev Author: darthgandalf Date: 2010-12-30 18:29:15 +0000 (Thu, 30 Dec 2010) Log Message: ----------- Add warning header to znc.conf Modified Paths: -------------- trunk/znc.cpp trunk/znc.h Modified: trunk/znc.cpp =================================================================== --- trunk/znc.cpp 2010-12-30 12:16:33 UTC (rev 2217) +++ trunk/znc.cpp 2010-12-30 18:29:15 UTC (rev 2218) @@ -525,6 +525,8 @@ 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 @@ 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"); Modified: trunk/znc.h =================================================================== --- trunk/znc.h 2010-12-30 12:16:33 UTC (rev 2217) +++ trunk/znc.h 2010-12-30 18:29:15 UTC (rev 2218) @@ -146,6 +146,7 @@ bool DoRehash(CString& sError); // Returns true if something was done bool HandleUserDeletion(); + CString MakeConfigHeader(); protected: time_t m_TimeStarted; This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |