]> git.netwichtig.de Git - user/henk/code/inspircd.git/blobdiff - src/modules/m_securelist.cpp
Use !empty() instead of 'size() > 0' when checking parameter count.
[user/henk/code/inspircd.git] / src / modules / m_securelist.cpp
index f4042b8f6299cbdfec0d51a9773b6e43a0c3b84d..71788a835c2bbb9f1f6b3c4eac555aba046ab75b 100644 (file)
@@ -24,7 +24,7 @@
 class ModuleSecureList : public Module
 {
        std::vector<std::string> allowlist;
-       time_t WaitTime;
+       unsigned int WaitTime;
 
  public:
        Version GetVersion() CXX11_OVERRIDE
@@ -40,7 +40,7 @@ class ModuleSecureList : public Module
                for (ConfigIter i = tags.first; i != tags.second; ++i)
                        allowlist.push_back(i->second->getString("exception"));
 
-               WaitTime = ServerInstance->Config->ConfValue("securelist")->getInt("waittime", 60);
+               WaitTime = ServerInstance->Config->ConfValue("securelist")->getDuration("waittime", 60, 1);
        }
 
 
@@ -63,11 +63,11 @@ class ModuleSecureList : public Module
 
                        /* Not exempt, BOOK EM DANNO! */
                        user->WriteNotice("*** You cannot list within the first " + ConvToStr(WaitTime) + " seconds of connecting. Please try again later.");
-                       /* Some crap clients (read: mIRC, various java chat applets) muck up if they don't
+                       /* Some clients (e.g. mIRC, various java chat applets) muck up if they don't
                         * receive these numerics whenever they send LIST, so give them an empty LIST to mull over.
                         */
-                       user->WriteNumeric(RPL_LISTSTART, "Channel :Users Name");
-                       user->WriteNumeric(RPL_LISTEND, ":End of channel list.");
+                       user->WriteNumeric(RPL_LISTSTART, "Channel", "Users Name");
+                       user->WriteNumeric(RPL_LISTEND, "End of channel list.");
                        return MOD_RES_DENY;
                }
                return MOD_RES_PASSTHRU;