#include <ctype.h>
#include <stdlib.h>
-#include "../nick/nick.h"
-
#include "huser.h"
#include "hban.h"
#include "hchannel.h"
{
char chr = '\0';
int i;
- int repeats;
+ int repeats = 0;
for (i = 0;line[i];i++)
if (line[i] == chr)
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];