]> jfr.im git - irc/quakenet/newserv.git/commitdiff
Fix 64bit issues with G
authorPaul <redacted>
Wed, 28 Jan 2009 22:25:08 +0000 (22:25 +0000)
committerPaul <redacted>
Wed, 28 Jan 2009 22:25:08 +0000 (22:25 +0000)
helpmod2/hlamer.c

index 84171d2e5d933797572e2dc22dca2f91a196f900..7df076541ee4a7ff29a38bd8f64baaf8078a4b99 100644 (file)
@@ -214,12 +214,12 @@ static int hlc_check_flood(hlc_profile *hlc_prof, huser *husr, const char *line)
 
 static int hlc_check_spam(hlc_profile *hlc_prof, huser *husr, const char *line)
 {
-    if (husr->spam_val < (float)time(NULL))
-        husr->spam_val = (float)time(NULL);
+    if (husr->spam_val < (double)time(NULL))
+        husr->spam_val = (double)time(NULL);
 
-    husr->spam_val += (hlc_prof->constant_spam * (double)strlen(line));
+    husr->spam_val += ((double)(hlc_prof->constant_spam) * (double)strlen(line));
 
-    if (((int)husr->spam_val - time(NULL)) >= (hlc_prof->tolerance_spam))
+    if (((int)(husr->spam_val) - time(NULL)) >= (hlc_prof->tolerance_spam))
     {
         husr->spam_val = time(NULL);
         return ++husr->lc[HLC_SPAM];