+ if (routing.type == ROUTE_TYPE_MESSAGE)
+ {
+ char pfx = 0;
+ std::string dest = routing.serverdest;
+ if (ServerInstance->Modes->FindPrefix(dest[0]))
+ {
+ pfx = dest[0];
+ dest = dest.substr(1);
+ }
+ if (dest[0] == '#')
+ {
+ Channel* c = ServerInstance->FindChan(dest);
+ if (!c)
+ return;
+ TreeServerList 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++)
+ {
+ TreeSocket* Sock = i->second->GetSocket();
+ if (origin && origin->GetSocket() == Sock)
+ continue;
+ if (Sock)
+ Sock->WriteLine(data);
+ }
+ }
+ else if (dest[0] == '$')
+ {
+ if (origin)
+ DoOneToAllButSender(user->uuid, sent_cmd, params, origin->GetName());