]> jfr.im git - solanum.git/blobdiff - modules/core/m_message.c
Show some target change statistics in /stats t.
[solanum.git] / modules / core / m_message.c
index e6fe7ef4c7683ce78fc4d14e38808869bd1dceb9..21c93af4923ddfc7ec4e068d006602307df000c7 100644 (file)
@@ -44,6 +44,7 @@
 #include "event.h"
 #include "patricia.h"
 #include "s_newconf.h"
+#include "s_stats.h"
 
 static int m_message(int, const char *, struct Client *, struct Client *, int, const char **);
 static int m_privmsg(struct Client *, struct Client *, int, const char **);
@@ -609,6 +610,7 @@ add_target(struct Client *source_p, struct Client *target_p)
                /* cant clear any, full target list */
                else if(USED_TARGETS(source_p) == 10)
                {
+                       ServerStats->is_tgch++;
                        add_tgchange(source_p->sockhost);
                        return 0;
                }
@@ -781,7 +783,7 @@ flood_attack_client(int p_or_n, struct Client *source_p, struct Client *target_p
                {
                        if(target_p->localClient->flood_noticed == 0)
                        {
-                               sendto_realops_snomask(SNO_BOTS, L_ALL,
+                               sendto_realops_snomask(SNO_BOTS, L_NETWIDE,
                                                     "Possible Flooder %s[%s@%s] on %s target: %s",
                                                     source_p->name, source_p->username,
                                                     source_p->orighost,
@@ -836,7 +838,7 @@ flood_attack_channel(int p_or_n, struct Client *source_p, struct Channel *chptr,
                {
                        if(chptr->flood_noticed == 0)
                        {
-                               sendto_realops_snomask(SNO_BOTS, L_ALL,
+                               sendto_realops_snomask(SNO_BOTS, *chptr->chname == '&' ? L_ALL : L_NETWIDE,
                                                     "Possible Flooder %s[%s@%s] on %s target: %s",
                                                     source_p->name, source_p->username,
                                                     source_p->orighost,
@@ -972,6 +974,13 @@ handle_special(int p_or_n, const char *command, struct Client *client_p,
                        return;
                }
 
+               if(MyClient(source_p) && !IsOperMassNotice(source_p))
+               {
+                       sendto_one(source_p, form_str(ERR_NOPRIVS),
+                                  me.name, source_p->name, "mass_notice");
+                       return;
+               }
+
                if((s = strrchr(nick, '.')) == NULL)
                {
                        sendto_one_numeric(source_p, ERR_NOTOPLEVEL,