]> jfr.im git - irc/freenode/ircd-seven.git/commitdiff
Don't ratelimit local /motd
authorEd Kellett <redacted>
Sun, 13 Jan 2019 23:10:50 +0000 (23:10 +0000)
committerJanik Kleinhoff <redacted>
Tue, 26 Mar 2019 03:40:28 +0000 (03:40 +0000)
modules/m_motd.c

index cb4b171389602640513f81acb43cde94c4aeb837..66f00c39cb5724696f4cb08440b858e6da578525 100644 (file)
@@ -66,17 +66,18 @@ 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 (parc < 2) {
+               /* do nothing */
+       } else if ((last_used + ConfigFileEntry.pace_wait) > rb_current_time()) {
                /* safe enough to give this on a local connect only */
                sendto_one(source_p, form_str(RPL_LOAD2HI),
                           me.name, source_p->name, "MOTD");
                sendto_one(source_p, form_str(RPL_ENDOFMOTD),
                           me.name, source_p->name);
                return 0;
-       }
-       else
+       } else {
                last_used = rb_current_time();
+       }
 
        if(hunt_server(client_p, source_p, ":%s MOTD :%s", 1, parc, parv) != HUNTED_ISME)
                return 0;