diff options
| author | 2022-05-17 20:06:21 +0100 | |
|---|---|---|
| committer | 2022-05-17 20:06:21 +0100 | |
| commit | 04fba25ada45f787ff6c93f813912b81a257538a (patch) | |
| tree | 21488fabaaa50e27f47764b8d8c29963924cf7fb /src/modules/m_spanningtree/main.cpp | |
| parent | Fix an oversight in commit 3be039e. (diff) | |
Deprecate the (raw)version SINFO keys and split out customversion/rawbranch.
Diffstat (limited to 'src/modules/m_spanningtree/main.cpp')
| -rw-r--r-- | src/modules/m_spanningtree/main.cpp | 21 |
1 files changed, 12 insertions, 9 deletions
diff --git a/src/modules/m_spanningtree/main.cpp b/src/modules/m_spanningtree/main.cpp index cc5f27ccc..f186d3d02 100644 --- a/src/modules/m_spanningtree/main.cpp +++ b/src/modules/m_spanningtree/main.cpp @@ -325,16 +325,19 @@ ModResult ModuleSpanningTree::HandleVersion(const CommandBase::Params& parameter return MOD_RES_PASSTHRU; } - // If an oper wants to see the version then show the full version string instead of the normal, - // but only if it is non-empty. - // If it's empty it might be that the server is still syncing (full version hasn't arrived yet) - // or the server is a 2.0 server and does not send a full version. - bool showfull = ((user->IsOper()) && (!found->GetFullVersion().empty())); - Numeric::Numeric numeric(RPL_VERSION); - irc::tokenstream tokens(showfull ? found->GetFullVersion() : found->GetVersion()); - for (std::string token; tokens.GetTrailing(token); ) - numeric.push(token); + if (user->IsOper()) + { + numeric.push(found->rawversion + "."); + numeric.push(found->GetName()); + numeric.push("[" + found->GetId() + "] " + found->customversion); + } + else + { + numeric.push(found->rawbranch + "."); + numeric.push(found->GetPublicName()); + numeric.push(found->customversion); + } user->WriteNumeric(numeric); } else |
