summaryrefslogtreecommitdiff
path: root/src/commands/cmd_stats.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/commands/cmd_stats.cpp')
-rw-r--r--src/commands/cmd_stats.cpp3
1 files changed, 2 insertions, 1 deletions
diff --git a/src/commands/cmd_stats.cpp b/src/commands/cmd_stats.cpp
index d362d4614..05c4ae0d2 100644
--- a/src/commands/cmd_stats.cpp
+++ b/src/commands/cmd_stats.cpp
@@ -39,7 +39,8 @@ CmdResult CommandStats::Handle (const std::vector<std::string>& parameters, User
if (IS_LOCAL(user))
{
string_list values;
- DoStats(this->ServerInstance, parameters[0][0], user, values);
+ char search = parameters[0].length() ? parameters[0][0] : 0;
+ DoStats(this->ServerInstance, search, user, values);
for (size_t i = 0; i < values.size(); i++)
user->Write(":%s", values[i].c_str());
}