X-Git-Url: http://git.pk910.de/?a=blobdiff_plain;f=ircd%2Fsend.c;h=b7014d70eb306b3ac90c7c83da089a79c5b7f91f;hb=c866e047f08af0d9c67de5c4be5ac51f05f0dee9;hp=6f7e1d3d8bfe4e02a86f0a8523b52dc00f2d64cb;hpb=86650fb9472630fe2e20863bc08827cd855e5bfb;p=ircu2.10.12-pk.git diff --git a/ircd/send.c b/ircd/send.c index 6f7e1d3..b7014d7 100644 --- a/ircd/send.c +++ b/ircd/send.c @@ -600,6 +600,27 @@ void sendto_opmask_butone(struct Client *one, unsigned int mask, va_end(vl); } +/* + * Send a server notice to all users subscribing to the indicated + * except for - Ratelimited 1 / 30sec + */ +void sendto_opmask_butone_ratelimited(struct Client *one, unsigned int mask, + time_t *rate, const char *pattern, ...) +{ + va_list vl; + + if ((CurrentTime - *rate) < 30) + return; + else + *rate = CurrentTime; + + va_start(vl, pattern); + vsendto_opmask_butone(one, mask, pattern, vl); + va_end(vl); + +} + + /* * Same as above, except called with a variable argument list */