summaryrefslogtreecommitdiff
path: root/src/cmd_whowas.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/cmd_whowas.cpp')
-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");