From b193391141af466ec36bb5b1a30650eb67cccb0f Mon Sep 17 00:00:00 2001 From: brain Date: Sun, 10 Apr 2005 23:56:57 +0000 Subject: Fixed to not have an idle time greater than the signon time git-svn-id: http://svn.inspircd.org/repository/trunk/inspircd@1039 e03df62e-2008-0410-955e-edbf42e46eb7 --- src/modules/m_setidle.cpp | 3 +++ 1 file changed, 3 insertions(+) diff --git a/src/modules/m_setidle.cpp b/src/modules/m_setidle.cpp index 2e34f6ae7..c4d812d00 100644 --- a/src/modules/m_setidle.cpp +++ b/src/modules/m_setidle.cpp @@ -27,6 +27,9 @@ Server *Srv = NULL; void handle_setidle(char **parameters, int pcnt, userrec *user) { 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) + user->signon = user->idle_lastmsg; Srv->SendOpers(std::string(user->nick)+" used SETIDLE to set their idle time to "+std::string(parameters[0])+" seconds"); WriteServ(user->fd,"944 %s :Idle time set.",user->nick); } -- cgit v1.2.3