mirror of
https://github.com/inspircd/inspircd.git
synced 2025-03-10 11:09:04 -04:00
m_spanningtree Remove unused SpanningTreeUtilities::BestRouteTo()
This commit is contained in:
parent
6c5ac89f35
commit
610a74ecea
@ -67,32 +67,6 @@ TreeServer* SpanningTreeUtilities::FindServer(const std::string &ServerName)
|
||||
}
|
||||
}
|
||||
|
||||
/** Returns the locally connected server we must route a
|
||||
* message through to reach server 'ServerName'. This
|
||||
* only applies to one-to-one and not one-to-many routing.
|
||||
* See the comments for the constructor of TreeServer
|
||||
* for more details.
|
||||
*/
|
||||
TreeServer* SpanningTreeUtilities::BestRouteTo(const std::string &ServerName)
|
||||
{
|
||||
TreeServer* Found = FindServer(ServerName);
|
||||
if (Found)
|
||||
{
|
||||
return Found->GetRoute();
|
||||
}
|
||||
else
|
||||
{
|
||||
// Cheat a bit. This allows for (better) working versions of routing commands with nick based prefixes, without hassle
|
||||
User *u = ServerInstance->FindNick(ServerName);
|
||||
if (u)
|
||||
{
|
||||
return TreeServer::Get(u)->GetRoute();
|
||||
}
|
||||
|
||||
return NULL;
|
||||
}
|
||||
}
|
||||
|
||||
/** Find the first server matching a given glob mask.
|
||||
* We iterate over the list and match each one until we get a hit.
|
||||
*/
|
||||
|
@ -148,10 +148,6 @@ class SpanningTreeUtilities : public classbase
|
||||
*/
|
||||
TreeServer* FindServerID(const std::string &id);
|
||||
|
||||
/** Find a route to a server by name
|
||||
*/
|
||||
TreeServer* BestRouteTo(const std::string &ServerName);
|
||||
|
||||
/** Find a server by glob mask
|
||||
*/
|
||||
TreeServer* FindServerMask(const std::string &ServerName);
|
||||
|
Loading…
x
Reference in New Issue
Block a user