mirror of
https://github.com/inspircd/inspircd.git
synced 2025-03-10 19:19:02 -04:00
Added test code for one-to-many PRIVMSG
git-svn-id: http://svn.inspircd.org/repository/trunk/inspircd@1994 e03df62e-2008-0410-955e-edbf42e46eb7
This commit is contained in:
parent
71d64b86a0
commit
8762141e13
@ -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)
|
||||
|
Loading…
x
Reference in New Issue
Block a user