Revs 945-948;952-953:

- add timezone offset if server is in another timezone than the client
- add prependTimestamp
- add version number to configure.in
- write connect delay back into znc.conf


git-svn-id: https://znc.svn.sourceforge.net/svnroot/znc/trunk@801 726aef4b-f618-498e-8847-2d620e286838
This commit is contained in:
psychon
2007-05-16 22:29:39 +00:00
parent 9b671ee976
commit 1fa9187be6
5 changed files with 53 additions and 18 deletions
+14 -1
View File
@@ -395,6 +395,8 @@ bool CZNC::WriteConfig() {
File.Write("Listen" + s6 + " = " + sHostPortion + CString((pListener->IsSSL()) ? "+" : "") + CString(pListener->GetPort()) + "\r\n");
}
File.Write("ConnectDelay = " + CString(m_uiConnectDelay) + "\r\n");
if (!m_sISpoofFile.empty()) {
File.Write("ISpoofFile = " + m_sISpoofFile + "\r\n");
if (!m_sISpoofFormat.empty()) { File.Write("ISpoofFormat = " + m_sISpoofFormat + "\r\n"); }
@@ -1000,17 +1002,28 @@ bool CZNC::ParseConfig(const CString& sConfig) {
} else if (sName.CaseCmp("AppendTimestamp") == 0) {
pUser->SetTimestampAppend(sValue.ToBool());
continue;
} else if (sName.CaseCmp("PrependTimestamp") == 0) {
pUser->SetTimestampPrepend(sValue.ToBool());
continue;
} else if (sName.CaseCmp("Timestamp") == 0) {
if(sValue.Trim_n().CaseCmp("true") != 0) {
if(sValue.Trim_n().CaseCmp("append") == 0) {
pUser->SetTimestampAppend(true);
pUser->SetTimestampPrepend(false);
} else if(sValue.Trim_n().CaseCmp("prepend") == 0) {
pUser->SetTimestampAppend(false);
pUser->SetTimestampPrepend(true);
} else if(sValue.Trim_n().CaseCmp("false") == 0) {
pUser->SetTimestampFormat("");
pUser->SetTimestampAppend(false);
pUser->SetTimestampPrepend(false);
} else {
pUser->SetTimestampFormat(sValue);
}
}
continue;
} else if (sName.CaseCmp("TimezoneOffset") == 0) {
pUser->SetTimezoneOffset(sValue.ToDouble()); // there is no ToFloat()
continue;
} else if (sName.CaseCmp("LoadModule") == 0) {
CString sModName = sValue.Token(0);
CUtils::PrintAction("Loading Module [" + sModName + "]");