]> jfr.im git - solanum.git/blobdiff - modules/m_motd.c
m_info: Correct description of general::client_exit like in example confs.
[solanum.git] / modules / m_motd.c
index 15742ff3f5117eadd77b3665ae08e142d30cdbc8..f798029a5bec78ce574787e69686719417b82102 100644 (file)
@@ -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