/*
* InspIRCd -- Internet Relay Chat Daemon
*
+ * Copyright (C) 2017 B00mX0r <b00mx0r@aureus.pw>
+ * Copyright (C) 2016, 2018-2020 Sadie Powell <sadie@witchery.services>
* Copyright (C) 2014 Adam <Adam@anope.org>
+ * Copyright (C) 2013-2016 Attila Molnar <attilamolnar@hush.com>
+ * Copyright (C) 2012 Robby <robby@chatbelgie.be>
+ * Copyright (C) 2009 Uli Schlachter <psychon@inspircd.org>
* Copyright (C) 2009 Daniel De Graaf <danieldg@inspircd.org>
- * Copyright (C) 2007-2008 Craig Edwards <craigedwards@brainbox.cc>
+ * Copyright (C) 2008 Thomas Stagner <aquanight@inspircd.org>
* Copyright (C) 2008 Robin Burchell <robin+git@viroteck.net>
+ * Copyright (C) 2007, 2010 Craig Edwards <brain@inspircd.org>
*
* This file is part of InspIRCd. InspIRCd is free software: you can
* redistribute it and/or modify it under the terms of the GNU General Public
std::string buffer = current->GetName();
if (user->IsOper())
{
- buffer += " (" + current->GetID() + ")";
+ buffer += " (" + current->GetId();
+
+ const std::string& cur_vers = current->GetRawVersion();
+ if (!cur_vers.empty())
+ buffer += " " + cur_vers;
+
+ buffer += ")";
}
// Pad with spaces until its at max len, max_len must always be >= my names length
if (user->IsOper())
{
time_t secs_up = ServerInstance->Time() - current->age;
- buffer += " [Up: " + ModuleSpanningTree::TimeToStr(secs_up) + (current->rtt == 0 ? "]" : " Lag: " + ConvToStr(current->rtt) + "ms]");
+ buffer += " [Up: " + InspIRCd::DurationString(secs_up) + (current->rtt == 0 ? "]" : " Lag: " + ConvToStr(current->rtt) + "ms]");
}
std::vector<std::string> map;
if (j != child_map.begin())
{
// If this child is not my last child, then add |
- // to be able to "link" the next server in my list to me, and to indent this childs servers
+ // to be able to "link" the next server in my list to me, and to indent this child's servers
if (!last)
prefix = "| ";
- // Otherwise this is my last child, so just use a space as theres nothing else linked to me below this
+ // Otherwise this is my last child, so just use a space as there's nothing else linked to me below this
else
prefix = " ";
}
return map;
}
-CmdResult CommandMap::Handle(const std::vector<std::string>& parameters, User* user)
+CmdResult CommandMap::Handle(User* user, const Params& parameters)
{
if (parameters.size() > 0)
{
return CMD_SUCCESS;
}
-RouteDescriptor CommandMap::GetRouting(User* user, const std::vector<std::string>& parameters)
+RouteDescriptor CommandMap::GetRouting(User* user, const Params& parameters)
{
if (!parameters.empty())
return ROUTE_UNICAST(parameters[0]);