2 * InspIRCd -- Internet Relay Chat Daemon
4 * Copyright (C) 2018-2019 Sadie Powell <sadie@witchery.services>
5 * Copyright (C) 2017 B00mX0r <b00mx0r@aureus.pw>
6 * Copyright (C) 2014 Attila Molnar <attilamolnar@hush.com>
8 * This file is part of InspIRCd. InspIRCd is free software: you can
9 * redistribute it and/or modify it under the terms of the GNU General Public
10 * License as published by the Free Software Foundation, version 2.
12 * This program is distributed in the hope that it will be useful, but WITHOUT
13 * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
14 * FOR A PARTICULAR PURPOSE. See the GNU General Public License for more
17 * You should have received a copy of the GNU General Public License
18 * along with this program. If not, see <http://www.gnu.org/licenses/>.
23 #include "treeserver.h"
26 CmdResult CommandSInfo::HandleServer(TreeServer* server, CommandBase::Params& params)
28 const std::string& key = params.front();
29 const std::string& value = params.back();
31 if (key == "fullversion")
33 server->SetFullVersion(value);
35 else if (key == "version")
37 server->SetVersion(value);
39 else if (key == "rawversion")
41 server->SetRawVersion(value);
43 else if (key == "desc")
45 // Only sent when the description of a server changes because of a rehash; not sent on burst
46 ServerInstance->Logs->Log(MODNAME, LOG_DEFAULT, "Server description of " + server->GetName() + " changed: " + value);
47 server->SetDesc(value);
53 CommandSInfo::Builder::Builder(TreeServer* server, const char* key, const std::string& val)
54 : CmdBuilder(server, "SINFO")
56 push(key).push_last(val);