X-Git-Url: https://git.netwichtig.de/gitweb/?a=blobdiff_plain;ds=sidebyside;f=src%2Fmodules%2Fm_setidle.cpp;h=eaae082499d0c1dfcbccb018cdd197b6fd534956;hb=e59cb85871f75b7603c63c6cd274d57536cf6794;hp=37984030b6ea5ffbe0b04b974051c6b987dff786;hpb=384ef31bc01e4a1a2e59d082c9066002410ba54a;p=user%2Fhenk%2Fcode%2Finspircd.git diff --git a/src/modules/m_setidle.cpp b/src/modules/m_setidle.cpp index 37984030b..eaae08249 100644 --- a/src/modules/m_setidle.cpp +++ b/src/modules/m_setidle.cpp @@ -40,8 +40,8 @@ class CommandSetidle : public SplitCommand 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; @@ -69,7 +69,7 @@ class ModuleSetIdle : public Module Version GetVersion() CXX11_OVERRIDE { - return Version("Allows opers to set their idle time", VF_VENDOR); + return Version("Provides the SETIDLE command, allows opers to set their idle time", VF_VENDOR); } };