X-Git-Url: https://git.netwichtig.de/gitweb/?a=blobdiff_plain;f=src%2Fmodules%2Fm_setidle.cpp;h=6302b36544fd1d1a10bd3d2f61557f0fec436d6a;hb=451e687f681ccab5c02a8de1a7d59b324efbfe08;hp=4a15fd0d5a050fff9c33f6694ae94d7909aba858;hpb=c0aba5b728b0a921d95ec120aa638dab1520b42f;p=user%2Fhenk%2Fcode%2Finspircd.git diff --git a/src/modules/m_setidle.cpp b/src/modules/m_setidle.cpp index 4a15fd0d5..6302b3654 100644 --- a/src/modules/m_setidle.cpp +++ b/src/modules/m_setidle.cpp @@ -21,6 +21,13 @@ #include "inspircd.h" +enum +{ + // InspIRCd-specific. + ERR_INVALIDIDLETIME = 948, + RPL_IDLETIMESET = 944 +}; + /** Handle /SETIDLE */ class CommandSetidle : public SplitCommand @@ -36,7 +43,7 @@ class CommandSetidle : public SplitCommand int idle = InspIRCd::Duration(parameters[0]); if (idle < 1) { - user->WriteNumeric(948, "Invalid idle time."); + user->WriteNumeric(ERR_INVALIDIDLETIME, "Invalid idle time."); return CMD_FAILURE; } user->idle_lastmsg = (ServerInstance->Time() - idle); @@ -44,7 +51,7 @@ class CommandSetidle : public SplitCommand if (user->signon > user->idle_lastmsg) user->signon = user->idle_lastmsg; ServerInstance->SNO->WriteToSnoMask('a', user->nick+" used SETIDLE to set their idle time to "+ConvToStr(idle)+" seconds"); - user->WriteNumeric(944, "Idle time set."); + user->WriteNumeric(RPL_IDLETIMESET, "Idle time set."); return CMD_SUCCESS; }