From: Paul Date: Wed, 28 Jan 2009 22:25:08 +0000 (+0000) Subject: Fix 64bit issues with G X-Git-Url: https://jfr.im/git/irc/quakenet/newserv.git/commitdiff_plain/c5d9f7b4cb7433c8349956672f56e6e8568bbecf Fix 64bit issues with G --- diff --git a/helpmod2/hlamer.c b/helpmod2/hlamer.c index 84171d2e..7df07654 100644 --- a/helpmod2/hlamer.c +++ b/helpmod2/hlamer.c @@ -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];