]> git.netwichtig.de Git - user/henk/code/inspircd.git/blobdiff - src/modules/m_check.cpp
cmd_who: don't show +p channels or channels hidden with m_hidechans
[user/henk/code/inspircd.git] / src / modules / m_check.cpp
index 96b357f20cc1d3716818447df7cbebd0ff105137..5063368b81506e023fff508298071b3c516bea81 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)
@@ -172,7 +174,7 @@ class CommandCheck : public Command
                        /* /check on a channel */
                        user->SendText(checkstr + " timestamp " + timestring(targchan->age));
 
-                       if (targchan->topic[0] != 0)
+                       if (!targchan->topic.empty())
                        {
                                /* there is a topic, assume topic related information exists */
                                user->SendText(checkstr + " topic " + targchan->topic);