diff options
author | Peter Powell <petpow@saberuk.com> | 2017-09-05 17:54:40 +0100 |
---|---|---|
committer | Peter Powell <petpow@saberuk.com> | 2017-09-06 10:44:41 +0100 |
commit | b13b1b8a0613e48013ca9f6a5279559d0aee0f73 (patch) | |
tree | 963c043afff8d92edfd774f034b2fb0b9f1e2517 /src/modules/m_setidle.cpp | |
parent | d68c5be901d1d3f3a68e9796f9cd0815a4568a72 (diff) |
Convert uncontroversial anonymous numerics to use constants.
Diffstat (limited to 'src/modules/m_setidle.cpp')
-rw-r--r-- | src/modules/m_setidle.cpp | 11 |
1 files changed, 9 insertions, 2 deletions
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; } |