Skip to content
Browse files

Increase the version number to 1.0

  • Loading branch information...
1 parent d0b7df5 commit 73b2daf24d982ffe1237cf36e108296c599d4060 @DarthGandalf DarthGandalf committed Nov 6, 2012
Showing with 9 additions and 9 deletions.
  1. +1 −1 configure.ac
  2. +3 −3 include/znc/version.h
  3. +5 −5 src/znc.cpp
View
2 configure.ac
@@ -7,7 +7,7 @@ AC_DEFUN([AC_PROG_CC], [m4_errprint(__file__:__line__[: Something is trying to u
dnl Needed for AC_PATH_PROGS_FEATURE_CHECK which was added in 2.62
AC_PREREQ([2.62])
dnl Keep the version number in sync with main.h!
-AC_INIT([znc], [0.207])
+AC_INIT([znc], [1.0])
AC_CONFIG_MACRO_DIR([m4])
AC_CONFIG_SRCDIR([src/znc.cpp])
AC_LANG([C++])
View
6 include/znc/version.h
@@ -2,10 +2,10 @@
#define _VERSION_H
// The following defines are for #if comparison (preprocessor only likes ints)
-#define VERSION_MAJOR 0
-#define VERSION_MINOR 207
+#define VERSION_MAJOR 1
+#define VERSION_MINOR 0
// This one is for display purpose
-#define VERSION (VERSION_MAJOR + VERSION_MINOR / 1000.0)
+#define VERSION (VERSION_MAJOR + VERSION_MINOR / 10.0)
// You can add -DVERSION_EXTRA="stuff" to your CXXFLAGS!
extern const char* ZNC_VERSION_EXTRA;
View
10 src/znc.cpp
@@ -79,7 +79,7 @@ CZNC::~CZNC() {
CString CZNC::GetVersion() {
char szBuf[128];
- snprintf(szBuf, sizeof(szBuf), "%1.3f%s", VERSION, ZNC_VERSION_EXTRA);
+ snprintf(szBuf, sizeof(szBuf), "%1.1f%s", VERSION, ZNC_VERSION_EXTRA);
// If snprintf overflows (which I doubt), we want to be on the safe side
szBuf[sizeof(szBuf) - 1] = '\0';
@@ -94,7 +94,7 @@ CString CZNC::GetTag(bool bIncludeVersion, bool bHTML) {
}
char szBuf[128];
- snprintf(szBuf, sizeof(szBuf), "ZNC %1.3f%s - ", VERSION, ZNC_VERSION_EXTRA);
+ snprintf(szBuf, sizeof(szBuf), "ZNC %1.1f%s - ", VERSION, ZNC_VERSION_EXTRA);
// If snprintf overflows (which I doubt), we want to be on the safe side
szBuf[sizeof(szBuf) - 1] = '\0';
@@ -422,7 +422,7 @@ bool CZNC::WriteConfig() {
config.AddKeyValuePair("MaxBufferSize", CString(m_uiMaxBufferSize));
config.AddKeyValuePair("SSLCertFile", CString(m_sSSLCertFile));
config.AddKeyValuePair("ProtectWebSessions", CString(m_bProtectWebSessions));
- config.AddKeyValuePair("Version", CString(VERSION, 3));
+ config.AddKeyValuePair("Version", CString(VERSION, 1));
for (size_t l = 0; l < m_vpListeners.size(); l++) {
CListener* pListener = m_vpListeners[l];
@@ -535,7 +535,7 @@ bool CZNC::WriteNewConfig(const CString& sConfigFile) {
VCString vsLines;
vsLines.push_back(MakeConfigHeader());
- vsLines.push_back("Version = " + CString(VERSION, 3));
+ vsLines.push_back("Version = " + CString(VERSION, 1));
m_sConfigFile = ExpandConfigPath(sConfigFile);
CUtils::PrintMessage("Building new config");
@@ -1083,7 +1083,7 @@ bool CZNC::DoRehash(CString& sError)
sSavedVersion = "< 0.203";
}
CUtils::PrintMessage("Found old config from ZNC " + sSavedVersion + ". Saving a backup of it.");
- BackupConfigOnce("pre-" + CString(VERSION, 3));
+ BackupConfigOnce("pre-" + CString(VERSION, 1));
} else if (fSavedVersion > VERSION + 0.000001) {
CUtils::PrintError("Config was saved from ZNC " + sSavedVersion + ". It may or may not work with current ZNC " + GetVersion());
}

0 comments on commit 73b2daf

Please sign in to comment.
Something went wrong with that request. Please try again.