diff options
| author | 2021-06-12 07:59:13 +0300 | |
|---|---|---|
| committer | 2021-06-12 05:59:13 +0100 | |
| commit | 96e0f18f7faf7bf590c311cd0b63725c64fb4800 (patch) | |
| tree | 0edba3211652ac7b72834f415bcc042504cc4cad /src/modules/m_spanningtree/protocolinterface.cpp | |
| parent | Use /run/inspircd as the runtime directory on Linux. (diff) | |
Code refactor and minor fix (#1879)
Diffstat (limited to 'src/modules/m_spanningtree/protocolinterface.cpp')
| -rw-r--r-- | src/modules/m_spanningtree/protocolinterface.cpp | 15 |
1 files changed, 8 insertions, 7 deletions
diff --git a/src/modules/m_spanningtree/protocolinterface.cpp b/src/modules/m_spanningtree/protocolinterface.cpp index aaf946333..c9d94d46d 100644 --- a/src/modules/m_spanningtree/protocolinterface.cpp +++ b/src/modules/m_spanningtree/protocolinterface.cpp @@ -38,13 +38,14 @@ void SpanningTreeProtocolInterface::GetServerList(ServerList& sl) for (server_hash::iterator i = Utils->serverlist.begin(); i != Utils->serverlist.end(); i++) { ServerInfo ps; - ps.servername = i->second->GetName(); - TreeServer* s = i->second->GetParent(); - ps.parentname = s ? s->GetName() : ""; - ps.usercount = i->second->UserCount; - ps.opercount = i->second->OperCount; - ps.description = i->second->GetDesc(); - ps.latencyms = i->second->rtt; + TreeServer* tree = i->second; + ps.servername = tree->GetName(); + TreeServer* parent = tree->GetParent(); + ps.parentname = parent ? parent->GetName() : ""; + ps.usercount = tree->UserCount; + ps.opercount = tree->OperCount; + ps.description = tree->GetDesc(); + ps.latencyms = tree->rtt; sl.push_back(ps); } } |
