diff options
| author | 2010-10-02 16:27:19 -0400 | |
|---|---|---|
| committer | 2010-10-02 16:27:19 -0400 | |
| commit | 1540f7475f4439a029f881eaa1efe747ee79da14 (patch) | |
| tree | 9ea646784217cd20b78c1a26045aeb88103c77fe /src/modules/m_spanningtree/postcommand.cpp | |
| parent | Make vhosts work when a user identifies with a server password (diff) | |
Remove some unneeded complexity from spanningtree
Diffstat (limited to 'src/modules/m_spanningtree/postcommand.cpp')
| -rw-r--r-- | src/modules/m_spanningtree/postcommand.cpp | 13 |
1 files changed, 6 insertions, 7 deletions
diff --git a/src/modules/m_spanningtree/postcommand.cpp b/src/modules/m_spanningtree/postcommand.cpp index 63a8d76c3..45523bea3 100644 --- a/src/modules/m_spanningtree/postcommand.cpp +++ b/src/modules/m_spanningtree/postcommand.cpp @@ -106,19 +106,18 @@ void SpanningTreeUtilities::RouteCommand(TreeServer* origin, const std::string & Channel* c = ServerInstance->FindChan(dest); if (!c) return; - TreeServerList list; + TreeSocketSet list; // TODO OnBuildExemptList hook was here GetListOfServersForChannel(c,list,pfx, CUList()); std::string data = ":" + user->uuid + " " + sent_cmd; for (unsigned int x = 0; x < params.size(); x++) data += " " + params[x]; - for (TreeServerList::iterator i = list.begin(); i != list.end(); i++) + for (TreeSocketSet::iterator i = list.begin(); i != list.end(); i++) { - TreeSocket* Sock = i->second->GetSocket(); + TreeSocket* Sock = *i; if (origin && origin->GetSocket() == Sock) continue; - if (Sock) - Sock->WriteLine(data); + Sock->WriteLine(data); } } else if (dest[0] == '$') @@ -134,8 +133,8 @@ void SpanningTreeUtilities::RouteCommand(TreeServer* origin, const std::string & User* d = ServerInstance->FindNick(dest); if (!d) return; - TreeServer* tsd = BestRouteTo(d->server); - if (tsd == origin) + TreeServer* tsd = FindServer(d->server); + if (origin && tsd->GetSocket() == origin->GetSocket()) // huh? no routing stuff around in a circle, please. return; DoOneToOne(user->uuid, sent_cmd, params, d->server); |
