From e902e16974aaf703514c5e5c7b06ab5e19bc821b Mon Sep 17 00:00:00 2001 From: Ed Kellett Date: Fri, 2 Aug 2019 21:56:10 +0100 Subject: [PATCH] m_stats: don't ratelimit with no server argument --- modules/m_stats.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/modules/m_stats.c b/modules/m_stats.c index af433146..88bca7aa 100644 --- a/modules/m_stats.c +++ b/modules/m_stats.c @@ -212,7 +212,7 @@ m_stats(struct MsgBuf *msgbuf_p, struct Client *client_p, struct Client *source_ statchar = parv[1][0]; - if(MyClient(source_p) && !IsOper(source_p)) + if(MyClient(source_p) && !IsOper(source_p) && parc > 2) { /* Check the user is actually allowed to do /stats, and isnt flooding */ if((last_used + ConfigFileEntry.pace_wait) > rb_current_time()) @@ -228,7 +228,7 @@ m_stats(struct MsgBuf *msgbuf_p, struct Client *client_p, struct Client *source_ last_used = rb_current_time(); } - if(hunt_server (client_p, source_p, ":%s STATS %s :%s", 2, parc, parv) != HUNTED_ISME) + if(hunt_server(client_p, source_p, ":%s STATS %s :%s", 2, parc, parv) != HUNTED_ISME) return; if(tolower(statchar) != 'l')