summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorbrain <brain@e03df62e-2008-0410-955e-edbf42e46eb7>2005-04-11 12:18:19 +0000
committerbrain <brain@e03df62e-2008-0410-955e-edbf42e46eb7>2005-04-11 12:18:19 +0000
commit5f462cf84e2d28df31df7ba081f9f0822cec9e90 (patch)
tree3b4b4d7836bf65481c26695a595938675204539d /src
parent5c328da92fbf7a7e8b26ded2df085d3cf49f67f5 (diff)
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
Diffstat (limited to 'src')
-rw-r--r--src/modules/m_setidle.cpp5
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)