diff options
Diffstat (limited to 'src/modules/m_setidle.cpp')
-rw-r--r-- | src/modules/m_setidle.cpp | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/src/modules/m_setidle.cpp b/src/modules/m_setidle.cpp index c4d812d00..658e6ad1f 100644 --- a/src/modules/m_setidle.cpp +++ b/src/modules/m_setidle.cpp @@ -26,6 +26,11 @@ Server *Srv = NULL; void handle_setidle(char **parameters, int pcnt, userrec *user) { + if (atoi(parameters[0]) < 1) + { + WriteServ(user->fd,"943 %s :Invalid idle time.",user->nick); + return; + } user->idle_lastmsg = time(NULL) - atoi(parameters[0]); // minor tweak - we cant have signon time shorter than our idle time! if (user->signon > user->idle_lastmsg) |