? Makefile ? config.log ? config.settings ? config.status ? spamchan.patch ? unreal ? extras/c-ares ? extras/c-ares-1.3.2 ? extras/c-ares.tar ? extras/regexp ? extras/tre-0.7.2 ? extras/tre.tar ? include/setup.h ? ircdcron/ircdchk ? src/ircd ? src/version.c ? src/modules/Makefile Index: include/dynconf.h =================================================================== RCS file: /home/cmunk/ircsystems/cvsroot/unreal/include/dynconf.h,v retrieving revision 1.1.1.1.2.22 diff -u -r1.1.1.1.2.22 dynconf.h --- include/dynconf.h 22 Dec 2006 21:10:30 -0000 1.1.1.1.2.22 +++ include/dynconf.h 1 May 2007 17:22:26 -0000 @@ -39,6 +39,7 @@ char *x_netadmin_host; char *x_coadmin_host; char *x_hidden_host; + char *x_spamchan; char *x_prefix_quit; char *x_helpchan; char *x_stats_server; @@ -201,6 +202,7 @@ #define techadmin_host iConf.network.x_techadmin_host #define hidden_host iConf.network.x_hidden_host #define helpchan iConf.network.x_helpchan +#define spamchan iConf.network.x_spamchan #define STATS_SERVER iConf.network.x_stats_server #define iNAH iConf.network.x_inah #define prefix_quit iConf.network.x_prefix_quit @@ -353,6 +355,7 @@ unsigned has_hiddenhost_prefix:1; unsigned has_prefix_quit:1; unsigned has_help_channel:1; + unsigned has_spam_channel:1; unsigned has_stats_server:1; unsigned has_cloak_keys:1; unsigned has_options_webtv_support:1; Index: src/s_conf.c =================================================================== RCS file: /home/cmunk/ircsystems/cvsroot/unreal/src/s_conf.c,v retrieving revision 1.1.1.1.2.14 diff -u -r1.1.1.1.2.14 s_conf.c --- src/s_conf.c 22 Dec 2006 21:10:32 -0000 1.1.1.1.2.14 +++ src/s_conf.c 1 May 2007 17:22:31 -0000 @@ -1499,6 +1499,7 @@ ircfree(i->network.x_hidden_host); ircfree(i->network.x_prefix_quit); ircfree(i->network.x_helpchan); + ircfree(i->network.x_spamchan); ircfree(i->network.x_stats_server); ircfree(i->spamfilter_ban_reason); ircfree(i->spamfilter_virus_help_channel); @@ -2222,6 +2223,8 @@ Error("set::hosts::coadmin is missing"); if (!settings.has_help_channel) Error("set::help-channel is missing"); + if (!settings.has_spam_channel) + Error("set::spam-channel is missing"); if (!settings.has_hiddenhost_prefix) Error("set::hiddenhost-prefix is missing"); @@ -6771,6 +6774,9 @@ else if (!strcmp(cep->ce_varname, "help-channel")) { ircstrdup(tempiConf.network.x_helpchan, cep->ce_vardata); } + else if (!strcmp(cep->ce_varname, "spam-channel")) { + ircstrdup(tempiConf.network.x_spamchan, cep->ce_vardata); + } else if (!strcmp(cep->ce_varname, "hiddenhost-prefix")) { ircstrdup(tempiConf.network.x_hidden_host, cep->ce_vardata); } @@ -7329,6 +7335,19 @@ CheckNull(cep); CheckDuplicate(cep, help_channel, "help-channel"); } + else if (!strcmp(cep->ce_varname, "spam-channel")) + { + CheckDuplicate(cep, spam_channel, "spam-channel"); + if ((cep->ce_vardata[0] != '#') || (strlen(cep->ce_vardata) > CHANNELLEN)) + { + config_error("%s:%i: set::spam-channel: " + "specified channelname is too long or contains invalid characters (%s)", + cep->ce_fileptr->cf_filename, cep->ce_varlinenum, + cep->ce_vardata); + errors++; + continue; + } + } else if (!strcmp(cep->ce_varname, "hiddenhost-prefix")) { CheckNull(cep); CheckDuplicate(cep, hiddenhost_prefix, "hiddenhost-prefix"); Index: src/modules/m_stats.c =================================================================== RCS file: /home/cmunk/ircsystems/cvsroot/unreal/src/modules/Attic/m_stats.c,v retrieving revision 1.1.6.11 diff -u -r1.1.6.11 m_stats.c --- src/modules/m_stats.c 22 Dec 2006 21:10:33 -0000 1.1.6.11 +++ src/modules/m_stats.c 1 May 2007 17:22:34 -0000 @@ -1246,6 +1246,8 @@ sptr->name, hidden_host); sendto_one(sptr, ":%s %i %s :help-channel: %s", me.name, RPL_TEXT, sptr->name, helpchan); + sendto_one(sptr, ":%s %i %s :spam-channel: %s", me.name, RPL_TEXT, + sptr->name, spamchan); sendto_one(sptr, ":%s %i %s :cloak-keys: %s", me.name, RPL_TEXT, sptr->name, CLOAK_KEYCRC); sendto_one(sptr, ":%s %i %s :kline-address: %s", me.name, RPL_TEXT, Index: src/modules/m_tkl.c =================================================================== RCS file: /home/cmunk/ircsystems/cvsroot/unreal/src/modules/Attic/m_tkl.c,v retrieving revision 1.1.6.13 diff -u -r1.1.6.13 m_tkl.c --- src/modules/m_tkl.c 22 Dec 2006 21:10:33 -0000 1.1.6.13 +++ src/modules/m_tkl.c 1 May 2007 17:22:35 -0000 @@ -2413,6 +2413,7 @@ int _dospamfilter(aClient *sptr, char *str_in, int type, char *target, int flags, aTKline **rettk) { aTKline *tk; +aChannel *chptr; char *str; if (rettk) @@ -2456,6 +2457,9 @@ cmdname_by_spamftarget(type), targetbuf, str, unreal_decodespace(tk->ptr.spamf->tkl_reason)); + if ((chptr = find_channel(spamchan, NullChn)) != NullChn) + sendto_channel_butone(&me, &me, chptr, ":%s PRIVMSG %s :%s", me.name, spamchan, buf); + sendto_snomask(SNO_SPAMF, "%s", buf); sendto_serv_butone_token(NULL, me.name, MSG_SENDSNO, TOK_SENDSNO, "S :%s", buf); ircd_log(LOG_SPAMFILTER, "%s", buf);