X-Git-Url: https://jfr.im/git/irc/evilnet/x3.git/blobdiff_plain/ee37b3471e8ce23211ecabf50507f96383b239cd..928e5a35af3dc82bdfbdd041dd3160e0a59aa01d:/src/spamserv.c diff --git a/src/spamserv.c b/src/spamserv.c index 9f6ff99..cebafd0 100644 --- a/src/spamserv.c +++ b/src/spamserv.c @@ -3,7 +3,7 @@ * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by - * the Free Software Foundation; either version 2 of the License, or + * the Free Software Foundation; either version 3 of the License, or * (at your option) any later version. Important limitations are * listed in the COPYING file that accompanies this software. * @@ -294,8 +294,12 @@ spamserv_register_channel(struct chanNode *channel, struct string_list *exceptio cInfo->exceptfloodlevel = 100; cInfo->capsmin = 10; cInfo->capspercent = 25; + + /* XXX Rewrite the flag system */ if (strlen(info) < 5) strcat(info, "s"); + if (strlen(info) < 6) + strcat(info, "s"); safestrncpy(cInfo->info, info, sizeof(cInfo->info)); cInfo->suspend_expiry = 0; @@ -592,8 +596,8 @@ spamserv_create_user(struct userNode *user) if(kNode) { - dict_remove(killed_users_dict, irc_ntoa(&user->ip)); free(kNode); + dict_remove(killed_users_dict, irc_ntoa(&user->ip)); } } @@ -2892,7 +2896,7 @@ spamserv_channel_message(struct chanNode *channel, struct userNode *user, char * int size = strlen(user->hostname) + 3; char *mask = alloca(size); snprintf(mask, size, "*@%s", user->hostname); - gline_add(spamserv->nick, mask, spamserv_conf.gline_duration, reason, now, 1, 0); + gline_add(spamserv->nick, mask, spamserv_conf.gline_duration, reason, now, now, 1, 0); spamserv_debug(SSMSG_DEBUG_GLINE, user->nick, user->hostname, channel->name); } else if(CHECK_KILL(uInfo)) @@ -3214,7 +3218,7 @@ init_spamserv(const char *nick) return; const char *modes = conf_get_data("services/spamserv/modes", RECDB_QSTRING); - spamserv = AddService(nick, modes ? modes : NULL, "Anti Spam Services", NULL); + spamserv = AddLocalUser(nick, nick, NULL, "Anti Spam Services", modes ? modes : NULL); spamserv_service = service_register(spamserv); conf_register_reload(spamserv_conf_read);