X-Git-Url: https://git.netwichtig.de/gitweb/?a=blobdiff_plain;f=src%2Fmodules%2Fm_spanningtree%2Fsinfo.cpp;h=24bf3ed78dc8293fd632bd909dc50c43d506a32f;hb=3151d60c1ecc9462e4c335282ee6c31672f45111;hp=76697a496c5f1557d95e21bc40dc5c690c858f3a;hpb=92bc6a513b12fd2b4425aac6c93ccb82c15d611f;p=user%2Fhenk%2Fcode%2Finspircd.git diff --git a/src/modules/m_spanningtree/sinfo.cpp b/src/modules/m_spanningtree/sinfo.cpp index 76697a496..24bf3ed78 100644 --- a/src/modules/m_spanningtree/sinfo.cpp +++ b/src/modules/m_spanningtree/sinfo.cpp @@ -1,6 +1,8 @@ /* * InspIRCd -- Internet Relay Chat Daemon * + * Copyright (C) 2018-2019 Sadie Powell + * Copyright (C) 2017 B00mX0r * Copyright (C) 2014 Attila Molnar * * This file is part of InspIRCd. InspIRCd is free software: you can @@ -21,7 +23,7 @@ #include "treeserver.h" #include "commands.h" -CmdResult CommandSInfo::HandleServer(TreeServer* server, std::vector& params) +CmdResult CommandSInfo::HandleServer(TreeServer* server, CommandBase::Params& params) { const std::string& key = params.front(); const std::string& value = params.back(); @@ -34,12 +36,22 @@ CmdResult CommandSInfo::HandleServer(TreeServer* server, std::vectorSetVersion(value); } + else if (key == "rawversion") + { + server->SetRawVersion(value); + } + else if (key == "desc") + { + // Only sent when the description of a server changes because of a rehash; not sent on burst + ServerInstance->Logs->Log(MODNAME, LOG_DEFAULT, "Server description of " + server->GetName() + " changed: " + value); + server->SetDesc(value); + } return CMD_SUCCESS; } CommandSInfo::Builder::Builder(TreeServer* server, const char* key, const std::string& val) - : CmdBuilder(server->GetID(), "SINFO") + : CmdBuilder(server, "SINFO") { push(key).push_last(val); }