diff options
author | brain <brain@e03df62e-2008-0410-955e-edbf42e46eb7> | 2005-11-29 11:00:33 +0000 |
---|---|---|
committer | brain <brain@e03df62e-2008-0410-955e-edbf42e46eb7> | 2005-11-29 11:00:33 +0000 |
commit | ce58e1adb83465755146f374915b7084abecd66b (patch) | |
tree | 3d10bf3310d2274d6e68b4f61fdef3bcb9d9f818 /src | |
parent | e9be274f0b0c5502fab4feadbfa79665d8be85e9 (diff) |
PRIVMSG tweaks
git-svn-id: http://svn.inspircd.org/repository/trunk/inspircd@1996 e03df62e-2008-0410-955e-edbf42e46eb7
Diffstat (limited to 'src')
-rw-r--r-- | src/modules/m_spanningtree.cpp | 37 |
1 files changed, 20 insertions, 17 deletions
diff --git a/src/modules/m_spanningtree.cpp b/src/modules/m_spanningtree.cpp index 5097980ad..3d6639d69 100644 --- a/src/modules/m_spanningtree.cpp +++ b/src/modules/m_spanningtree.cpp @@ -1227,26 +1227,29 @@ class ModuleSpanningTree : public Module } 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++) + if (std::string(user->server) == Srv->GetServerName()) { - char* o = (*ulist)[j]; - userrec* otheruser = (userrec*)o; - if (strcasecmp(otheruser->server,Srv->GetServerName().c_str())) + 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++) { - // 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()) + char* o = (*ulist)[j]; + userrec* otheruser = (userrec*)o; + if (strcasecmp(otheruser->server,Srv->GetServerName().c_str())) { - DoOneToOne(user->nick,"PRIVMSG",params,otheruser->server); - wlist.push_back(otheruser->server); + // 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); + } } } } |