diff options
author | brain <brain@e03df62e-2008-0410-955e-edbf42e46eb7> | 2005-04-10 23:56:57 +0000 |
---|---|---|
committer | brain <brain@e03df62e-2008-0410-955e-edbf42e46eb7> | 2005-04-10 23:56:57 +0000 |
commit | b193391141af466ec36bb5b1a30650eb67cccb0f (patch) | |
tree | 0bae81a36fdc47e6476ca4b761accf21ced08417 /src | |
parent | 4fd8e712c9ee5dc995aa716c49e497edadcf35ff (diff) |
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
Diffstat (limited to 'src')
-rw-r--r-- | src/modules/m_setidle.cpp | 3 |
1 files changed, 3 insertions, 0 deletions
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); } |