m_motd: don't ratelimit with no server argument
This commit is contained in:
parent
e902e16974
commit
20276d4011
1 changed files with 5 additions and 4 deletions
|
@ -67,17 +67,18 @@ m_motd(struct MsgBuf *msgbuf_p, struct Client *client_p, struct Client *source_p
|
||||||
{
|
{
|
||||||
static time_t last_used = 0;
|
static time_t last_used = 0;
|
||||||
|
|
||||||
if((last_used + ConfigFileEntry.pace_wait) > rb_current_time() || !ratelimit_client(source_p, 6))
|
if (parc < 2) {
|
||||||
{
|
/* do nothing */
|
||||||
|
} else if ((last_used + ConfigFileEntry.pace_wait) > rb_current_time() || !ratelimit_client(source_p, 6)) {
|
||||||
/* safe enough to give this on a local connect only */
|
/* safe enough to give this on a local connect only */
|
||||||
sendto_one(source_p, form_str(RPL_LOAD2HI),
|
sendto_one(source_p, form_str(RPL_LOAD2HI),
|
||||||
me.name, source_p->name, "MOTD");
|
me.name, source_p->name, "MOTD");
|
||||||
sendto_one(source_p, form_str(RPL_ENDOFMOTD),
|
sendto_one(source_p, form_str(RPL_ENDOFMOTD),
|
||||||
me.name, source_p->name);
|
me.name, source_p->name);
|
||||||
return;
|
return;
|
||||||
}
|
} else {
|
||||||
else
|
|
||||||
last_used = rb_current_time();
|
last_used = rb_current_time();
|
||||||
|
}
|
||||||
|
|
||||||
if(hunt_server(client_p, source_p, ":%s MOTD :%s", 1, parc, parv) != HUNTED_ISME)
|
if(hunt_server(client_p, source_p, ":%s MOTD :%s", 1, parc, parv) != HUNTED_ISME)
|
||||||
return;
|
return;
|
||||||
|
|
Loading…
Reference in a new issue