From 9a14ee55dc6ddc8c3350289a964959cd6640e2fe Mon Sep 17 00:00:00 2001 From: michael Date: Tue, 18 Feb 2014 09:39:28 +0000 Subject: - Via p4: Make whowas honor disable_remote_commands git-svn-id: svn://svn.ircd-hybrid.org/svnroot/ircd-hybrid/branches/8.1.x@2987 82007160-df01-0410-b94d-b575c5fd34c7 --- modules/m_whowas.c | 15 ++++++++++----- 1 file changed, 10 insertions(+), 5 deletions(-) (limited to 'modules') diff --git a/modules/m_whowas.c b/modules/m_whowas.c index 62115e8..e89f9cb 100644 --- a/modules/m_whowas.c +++ b/modules/m_whowas.c @@ -50,11 +50,6 @@ whowas_do(struct Client *client_p, struct Client *source_p, int max = -1; const dlink_node *ptr = NULL; - if (parc > 3) - if (hunt_server(client_p, source_p, ":%s WHOWAS %s %s :%s", 3, - parc, parv) != HUNTED_ISME) - return; - if (parc > 2 && !EmptyString(parv[2])) if ((max = atoi(parv[2])) > 20 && !MyConnect(source_p)) max = 20; @@ -120,6 +115,11 @@ m_whowas(struct Client *client_p, struct Client *source_p, last_used = CurrentTime; + if (parc > 3 && !ConfigServerHide.disable_remote_commands) + if (hunt_server(client_p, source_p, ":%s WHOWAS %s %s :%s", 3, + parc, parv) != HUNTED_ISME) + return 0; + whowas_do(client_p, source_p, parc, parv); return 0; } @@ -135,6 +135,11 @@ mo_whowas(struct Client *client_p, struct Client *source_p, return 0; } + if (parc > 3) + if (hunt_server(client_p, source_p, ":%s WHOWAS %s %s :%s", 3, + parc, parv) != HUNTED_ISME) + return 0; + whowas_do(client_p, source_p, parc, parv); return 0; } -- cgit