From 5f462cf84e2d28df31df7ba081f9f0822cec9e90 Mon Sep 17 00:00:00 2001 From: brain Date: Mon, 11 Apr 2005 12:18:19 +0000 Subject: Added getrlimit/setrlimit to set process limits to allow a core dump Fixed m_setidle to only allow you to set a positive integer as the idle time Removed some logging from wildcard.cpp git-svn-id: http://svn.inspircd.org/repository/trunk/inspircd@1041 e03df62e-2008-0410-955e-edbf42e46eb7 --- src/modules/m_setidle.cpp | 5 +++++ 1 file changed, 5 insertions(+) (limited to 'src/modules') 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) -- cgit v1.2.3