]> git.netwichtig.de Git - user/henk/code/inspircd.git/commitdiff
m_check Fix non-standard format specifier %s passed to strftime() causing problems...
authorAttila Molnar <attilamolnar@hush.com>
Sat, 27 Dec 2014 13:50:22 +0000 (14:50 +0100)
committerAttila Molnar <attilamolnar@hush.com>
Sat, 27 Dec 2014 13:50:22 +0000 (14:50 +0100)
src/modules/m_check.cpp

index 96b357f20cc1d3716818447df7cbebd0ff105137..9c5c414f195473386d4b7bf2b2ad95061a694d10 100644 (file)
@@ -38,8 +38,10 @@ class CommandCheck : public Command
        {
                char timebuf[60];
                struct tm *mytime = gmtime(&time);
-               strftime(timebuf, 59, "%Y-%m-%d %H:%M:%S UTC (%s)", mytime);
-               return std::string(timebuf);
+               strftime(timebuf, 59, "%Y-%m-%d %H:%M:%S UTC (", mytime);
+               std::string ret(timebuf);
+               ret.append(ConvToStr(time)).push_back(')');
+               return ret;
        }
 
        void dumpExt(User* user, const std::string& checkstr, Extensible* ext)