Don't spam the network with local-interest protocol violations.
[ircu2.10.12-pk.git] / ircd / gline.c
index 92b5abe580b5a0e2df7e3d9437e4eca514f0101e..689e2fb5e63a642e31cb83742419be6a5f86fef4 100644 (file)
@@ -398,7 +398,12 @@ gline_add(struct Client *cptr, struct Client *sptr, char *userhost,
         /* uh, what to do here? */
         /* The answer, my dear Watson, is we throw a protocol_violation()
            -- hikari */
-        return protocol_violation(sptr,"%s has been smoking the sweet leaf and sent me a whacky gline",cli_name(sptr));
+        if (IsServer(cptr))
+          return protocol_violation(sptr,"%s has been smoking the sweet leaf and sent me a whacky gline",cli_name(sptr));
+        else {
+         sendto_opmask_butone(NULL, SNO_GLINE, "%s has been smoking the sweet leaf and sent me a whacky gline", cli_name(sptr));
+         return 0;
+        }
         break;
     }
      user = (*userhost =='$' ? userhost : userhost+2);