summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorpeavey <peavey@e03df62e-2008-0410-955e-edbf42e46eb7>2006-11-13 09:01:23 +0000
committerpeavey <peavey@e03df62e-2008-0410-955e-edbf42e46eb7>2006-11-13 09:01:23 +0000
commitc33de81eecbbce2850db626272f1008a3a332dfc (patch)
treea7bc3542a30aa46f0837f4564ee038d796a106b6
parent2dde288af73f9be02181569f3876f89f9dc11575 (diff)
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
-rw-r--r--src/cmd_whowas.cpp7
1 files changed, 7 insertions, 0 deletions
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");