From 25b3686f43d2a0dcc40157d7119a80b783a07f8f Mon Sep 17 00:00:00 2001 From: Peter Powell Date: Sat, 19 Jan 2019 12:55:31 +0000 Subject: Fix sending the entire VERSION output as a single parameter. Closes #1560. --- src/coremods/core_info/cmd_version.cpp | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) (limited to 'src/coremods') diff --git a/src/coremods/core_info/cmd_version.cpp b/src/coremods/core_info/cmd_version.cpp index 29d96169e..57f9b05cf 100644 --- a/src/coremods/core_info/cmd_version.cpp +++ b/src/coremods/core_info/cmd_version.cpp @@ -29,8 +29,12 @@ CommandVersion::CommandVersion(Module* parent) CmdResult CommandVersion::Handle(User* user, const Params& parameters) { - std::string version = ServerInstance->GetVersionString((user->IsOper())); - user->WriteNumeric(RPL_VERSION, version); + Numeric::Numeric numeric(RPL_VERSION); + irc::tokenstream tokens(ServerInstance->GetVersionString(user->IsOper())); + for (std::string token; tokens.GetTrailing(token); ) + numeric.push(token); + user->WriteNumeric(numeric); + LocalUser *lu = IS_LOCAL(user); if (lu != NULL) { -- cgit v1.2.3