#include "client.h"
#include "s_stats.h"
#include "hash.h"
+#include "s_conf.h"
#include "s_newconf.h"
+#include "s_serv.h"
+#include "send.h"
static int add_hashed_target(struct Client *source_p, uint32_t hashv);
{
uint32_t hashv;
+ if(!ConfigChannel.channel_target_change)
+ return 1;
+
hashv = fnv_hash_upper((const unsigned char *)chptr->chname, 32);
return add_hashed_target(source_p, hashv);
}
{
ServerStats.is_tgch++;
add_tgchange(source_p->sockhost);
+
+ if (!IsTGExcessive(source_p))
+ {
+ SetTGExcessive(source_p);
+ /* This is sent to L_ALL because it's regenerated on all servers
+ * that have the TGINFO module loaded.
+ */
+ sendto_realops_snomask(SNO_BOTS, L_ALL,
+ "Excessive target change from %s (%s@%s)",
+ source_p->name, source_p->username,
+ source_p->orighost);
+ }
+
+ sendto_match_servs(source_p, "*", CAP_ENCAP, NOCAPS,
+ "ENCAP * TGINFO 0");
+
return 0;
}
}