- if (!ShowWhoisFromOpers && IS_OPER(source))
- return;
-
- std::string wmsg = "*** ";
- wmsg += source->nick + " (" + source->ident + "@";
-
- /* XXX HasPrivPermission doesn't work correctly for remote users */
- if (IS_LOCAL(dest) && dest->HasPrivPermission("users/auspex"))
- {
- wmsg += source->host;
- }
- else
- {
- wmsg += source->dhost;
- }
-
- wmsg += ") did a /whois on you";
-
- if (IS_LOCAL(dest))
- {
- dest->WriteServ("NOTICE %s :%s", dest->nick.c_str(), wmsg.c_str());
- }
- else
- {
- std::string msg = std::string("::") + dest->server + " NOTICE " + dest->nick + " :" + wmsg;
- ServerInstance->PI->PushToClient(dest, msg);
- }
+ cmd.HandleFast(dest, source);
+ }
+ else
+ {
+ std::vector<std::string> params;
+ params.push_back(dest->server);
+ params.push_back("WHOISNOTICE");
+ params.push_back(dest->uuid);
+ params.push_back(source->uuid);
+ ServerInstance->PI->SendEncapsulatedData(params);