]> git.netwichtig.de Git - user/henk/code/inspircd.git/blobdiff - src/modules/m_check.cpp
Merge pull request #1094 from SISheogorath/insp20+fixed-Override
[user/henk/code/inspircd.git] / src / modules / m_check.cpp
index 994745422d34e256d4bde948a688d3cc91d518a5..5063368b81506e023fff508298071b3c516bea81 100644 (file)
@@ -38,11 +38,13 @@ 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, std::string checkstr, Extensible* ext)
+       void dumpExt(User* user, const std::string& checkstr, Extensible* ext)
        {
                std::stringstream dumpkeys;
                for(Extensible::ExtensibleStore::const_iterator i = ext->GetExtList().begin(); i != ext->GetExtList().end(); i++)
@@ -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);
@@ -199,7 +201,6 @@ class CommandCheck : public Command
                        }
 
                        irc::modestacker modestack(true);
-                       std::string letter_b("b");
                        for(BanList::iterator b = targchan->bans.begin(); b != targchan->bans.end(); ++b)
                        {
                                modestack.Push('b', b->data);