From c33de81eecbbce2850db626272f1008a3a332dfc Mon Sep 17 00:00:00 2001 From: peavey Date: Mon, 13 Nov 2006 09:01:23 +0000 Subject: Tell user command WHOWAS is disabled if disabled in config. git-svn-id: http://svn.inspircd.org/repository/trunk/inspircd@5736 e03df62e-2008-0410-955e-edbf42e46eb7 --- src/cmd_whowas.cpp | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/src/cmd_whowas.cpp b/src/cmd_whowas.cpp index 399214d70..f9bf536e7 100644 --- a/src/cmd_whowas.cpp +++ b/src/cmd_whowas.cpp @@ -25,6 +25,13 @@ extern "C" command_t* init_command(InspIRCd* Instance) CmdResult cmd_whowas::Handle (const char** parameters, int pcnt, userrec* user) { + /* if whowas disabled in config */ + if (ServerInstance->Config->WhoWasGroupSize == 0 || ServerInstance->Config->WhoWasMaxGroups == 0) + { + user->WriteServ("421 %s %s :This command has been disabled.",user->nick,command.c_str()); + return CMD_FAILURE; + } + irc::whowas::whowas_users::iterator i = ServerInstance->whowas.find(parameters[0]); ServerInstance->Log(DEBUG,"Entered cmd_whowas"); -- cgit v1.2.3