X-Git-Url: https://jfr.im/git/solanum.git/blobdiff_plain/e3354945168e45e49cc0716349d44837eef96db1..b2c208be091670e3c5259eba77187bae6ac6eece:/modules/m_motd.c diff --git a/modules/m_motd.c b/modules/m_motd.c index 15742ff3..f798029a 100644 --- a/modules/m_motd.c +++ b/modules/m_motd.c @@ -36,6 +36,7 @@ #include "modules.h" #include "s_conf.h" #include "cache.h" +#include "ratelimit.h" static int m_motd(struct Client *, struct Client *, int, const char **); static int mo_motd(struct Client *, struct Client *, int, const char **); @@ -59,7 +60,6 @@ static void motd_spy(struct Client *); /* ** m_motd -** parv[0] = sender prefix ** parv[1] = servername */ static int @@ -67,7 +67,7 @@ m_motd(struct Client *client_p, struct Client *source_p, int parc, const char *p { static time_t last_used = 0; - if((last_used + ConfigFileEntry.pace_wait) > rb_current_time()) + if((last_used + ConfigFileEntry.pace_wait) > rb_current_time() || !ratelimit_client(source_p, 6)) { /* safe enough to give this on a local connect only */ sendto_one(source_p, form_str(RPL_LOAD2HI), @@ -90,7 +90,6 @@ m_motd(struct Client *client_p, struct Client *source_p, int parc, const char *p /* ** mo_motd -** parv[0] = sender prefix ** parv[1] = servername */ static int