]> git.netwichtig.de Git - user/henk/code/inspircd.git/blobdiff - src/modules/m_setidle.cpp
Move the <disabled> tag out of the core to a new module.
[user/henk/code/inspircd.git] / src / modules / m_setidle.cpp
index 6302b36544fd1d1a10bd3d2f61557f0fec436d6a..8bca7000bb4cb0389b8e3e7cebf236785cafbaea 100644 (file)
@@ -38,10 +38,10 @@ class CommandSetidle : public SplitCommand
                flags_needed = 'o'; syntax = "<duration>";
        }
 
-       CmdResult HandleLocal(const std::vector<std::string>& parameters, LocalUser* user)
+       CmdResult HandleLocal(LocalUser* user, const Params& parameters) CXX11_OVERRIDE
        {
-               int idle = InspIRCd::Duration(parameters[0]);
-               if (idle < 1)
+               unsigned long idle;
+               if (!InspIRCd::Duration(parameters[0], idle))
                {
                        user->WriteNumeric(ERR_INVALIDIDLETIME, "Invalid idle time.");
                        return CMD_FAILURE;