X-Git-Url: https://git.netwichtig.de/gitweb/?a=blobdiff_plain;f=src%2Fmodules%2Fm_check.cpp;h=5063368b81506e023fff508298071b3c516bea81;hb=ccd4c11ea1a43d079eaae9708482ef4a9148796c;hp=07276445f220e1c29132aecf8131221486b59738;hpb=cbb06a27e9d06eadf3acf4c31be2b277ce0bc0be;p=user%2Fhenk%2Fcode%2Finspircd.git diff --git a/src/modules/m_check.cpp b/src/modules/m_check.cpp index 07276445f..5063368b8 100644 --- a/src/modules/m_check.cpp +++ b/src/modules/m_check.cpp @@ -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) @@ -114,7 +116,7 @@ class CommandCheck : public Command { std::string umodes; std::string cmodes; - for(char c='A'; c < 'z'; c++) + for(char c='A'; c <= 'z'; c++) { ModeHandler* mh = ServerInstance->Modes->FindMode(c, MODETYPE_USER); if (mh && mh->NeedsOper() && loctarg->HasModePermission(c, MODETYPE_USER)) @@ -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);