summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--src/modules/m_spanningtree.cpp26
1 files changed, 26 insertions, 0 deletions
diff --git a/src/modules/m_spanningtree.cpp b/src/modules/m_spanningtree.cpp
index 243e3dce2..9462b5252 100644
--- a/src/modules/m_spanningtree.cpp
+++ b/src/modules/m_spanningtree.cpp
@@ -1225,6 +1225,32 @@ class ModuleSpanningTree : public Module
DoOneToOne(user->nick,"PRIVMSG",params,d->server);
}
}
+ else
+ {
+ chanrec* c = (chanrec*)dest;
+ std::deque<std::string> params;
+ std::vector<std::string> wlist;
+ params.clear();
+ wlist.clear();
+ params.push_back(c->name);
+ params.push_back(":"+text);
+ std::vector<char*> *ulist = c->GetUsers();
+ for (unsigned int j = 0; j < ulist->size(); j++)
+ {
+ char* o = (*ulist)[j];
+ userrec* otheruser = (userrec*)o;
+ if (!strcasecmp(otheruser->server,Srv->GetServerName().c_str()))
+ {
+ // this user is on another server.
+ // Write that server, then mark that server so we dont write to it again.
+ if (find(wlist.begin(),wlist.end(),otheruser->server) == wlist.end())
+ {
+ DoOneToOne(user->nick,"PRIVMSG",params,otheruser->server);
+ wlist.push_back(otheruser->server);
+ }
+ }
+ }
+ }
}
virtual void OnUserJoin(userrec* user, chanrec* channel)