]> git.netwichtig.de Git - user/henk/code/inspircd.git/commitdiff
Make the build reproducible by removing time related macros.
authorPeter Powell <petpow@saberuk.com>
Wed, 16 Aug 2017 15:59:56 +0000 (16:59 +0100)
committerPeter Powell <petpow@saberuk.com>
Sat, 26 Aug 2017 14:27:59 +0000 (15:27 +0100)
The compile time on boot is not accurate as it will only change
when the translation unit containing it is edited.

The startup time in RPL_SERVERCREATED is a lot more useful than
the compilation time. ngIRCd also implements this behaviour.

src/inspircd.cpp
src/users.cpp

index 5b9ee670ac7edd27f666edfc03814011190ad342..abd63f95394406bb2ec73327d000a2f3c776fa29 100644 (file)
@@ -367,7 +367,7 @@ InspIRCd::InspIRCd(int argc, char** argv) :
                }
        }
 
-       std::cout << con_green << "InspIRCd - Internet Relay Chat Daemon" << con_reset << ", compiled on " __DATE__ " at " __TIME__ << std::endl;
+       std::cout << con_green << "InspIRCd - Internet Relay Chat Daemon" << con_reset << std::endl;
        std::cout << "For contributors & authors: " << con_green << "See /INFO Output" << con_reset << std::endl;
 
 #ifndef _WIN32
index d5493164483f4a2fa4c0dde41c04844c7cc907dc..a84e12b4aa348e24460df77a223c4c29b9461370 100644 (file)
@@ -539,7 +539,7 @@ void LocalUser::FullConnect()
 
        this->WriteNumeric(RPL_WELCOME, InspIRCd::Format("Welcome to the %s IRC Network %s", ServerInstance->Config->Network.c_str(), GetFullRealHost().c_str()));
        this->WriteNumeric(RPL_YOURHOSTIS, InspIRCd::Format("Your host is %s, running version %s", ServerInstance->Config->ServerName.c_str(), INSPIRCD_BRANCH));
-       this->WriteNumeric(RPL_SERVERCREATED, InspIRCd::Format("This server was created %s %s", __TIME__, __DATE__));
+       this->WriteNumeric(RPL_SERVERCREATED, InspIRCd::TimeString(ServerInstance->startup_time, "This server was created %H:%M:%S %b %d %Y"));
 
        const std::string& modelist = ServerInstance->Modes->GetModeListFor004Numeric();
        this->WriteNumeric(RPL_SERVERVERSION, ServerInstance->Config->ServerName, INSPIRCD_BRANCH, modelist);