X-Git-Url: https://git.netwichtig.de/gitweb/?a=blobdiff_plain;f=src%2Fcoremods%2Fcore_stats.cpp;h=ee0c50db2c5378068a04d2d41a27c152c0a9cb7a;hb=b9e11915a976daaf790ebc763aff56e19fd49e0f;hp=69f1f3cf89e384d16568cf608e1231781cf30911;hpb=304b6dbbf56710b1310fce8c5cf71b73334c060a;p=user%2Fhenk%2Fcode%2Finspircd.git diff --git a/src/coremods/core_stats.cpp b/src/coremods/core_stats.cpp index 69f1f3cf8..ee0c50db2 100644 --- a/src/coremods/core_stats.cpp +++ b/src/coremods/core_stats.cpp @@ -35,7 +35,7 @@ class CommandStats : public Command public: /** Constructor for stats. */ - CommandStats ( Module* parent) : Command(parent,"STATS",1,2) { syntax = " []"; } + CommandStats ( Module* parent) : Command(parent,"STATS",1,2) { allow_empty_last_param = false; syntax = " []"; } /** Handle command. * @param parameters The parameters to the command * @param user The user issuing the command @@ -44,7 +44,7 @@ class CommandStats : public Command CmdResult Handle(const std::vector& parameters, User *user); RouteDescriptor GetRouting(User* user, const std::vector& parameters) { - if (parameters.size() > 1) + if ((parameters.size() > 1) && (parameters[1].find('.') != std::string::npos)) return ROUTE_UNICAST(parameters[1]); return ROUTE_LOCALONLY; }