summaryrefslogtreecommitdiff
path: root/src/cmd_stats.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/cmd_stats.cpp')
-rw-r--r--src/cmd_stats.cpp11
1 files changed, 7 insertions, 4 deletions
diff --git a/src/cmd_stats.cpp b/src/cmd_stats.cpp
index 614511bf9..338a1a2ac 100644
--- a/src/cmd_stats.cpp
+++ b/src/cmd_stats.cpp
@@ -31,10 +31,13 @@ extern "C" command_t* init_command(InspIRCd* Instance)
CmdResult cmd_stats::Handle (const char** parameters, int pcnt, userrec *user)
{
- string_list values;
- DoStats(this->ServerInstance, *parameters[0], user, values);
- for (size_t i = 0; i < values.size(); i++)
- user->Write(":%s", values[i].c_str());
+ if (pcnt < 2)
+ {
+ string_list values;
+ DoStats(this->ServerInstance, *parameters[0], user, values);
+ for (size_t i = 0; i < values.size(); i++)
+ user->Write(":%s", values[i].c_str());
+ }
return CMD_SUCCESS;
}