- std::string line;
- for(int i = 1; i < pcnt; i++)
- {
- if (i != 1)
- line.append(" ");
-
- line.append(parameters[i]);
- }
-
- std::string* text = (std::string*)dest->GetExt("swhois");
-
- if(text)
- {
- // We already had it set...
-
- WriteOpers("%s used SWHOIS to set %s's extra whois from '%s' to '%s'", user->nick, dest->nick, text->c_str(), line.c_str());
-
- dest->Shrink("swhois");
- delete text;
- }
- else
- {
- WriteOpers("%s used SWHOIS to set %s's extra whois to '%s'", user->nick, dest->nick, line.c_str());
- }
-
- text = new std::string(line);
- dest->Extend("swhois", (char*)text);
+ user->WriteNumeric(ERR_NOSUCHNICK, "%s %s :No such nick/channel", user->nick.c_str(), parameters[0].c_str());
+ return CMD_FAILURE;
+ }
+
+ std::string* text;
+ dest->GetExt("swhois", text);
+
+ if (text)
+ {
+ // We already had it set...
+ if (!ServerInstance->ULine(user->server))
+ // Ulines set SWHOISes silently
+ ServerInstance->SNO->WriteToSnoMask('A', "%s used SWHOIS to set %s's extra whois from '%s' to '%s'", user->nick.c_str(), dest->nick.c_str(), text->c_str(), parameters[1].c_str());
+
+ dest->Shrink("swhois");
+ delete text;
+ }
+ else if (!ServerInstance->ULine(user->server))
+ {
+ // Ulines set SWHOISes silently
+ ServerInstance->SNO->WriteToSnoMask('A', "%s used SWHOIS to set %s's extra whois to '%s'", user->nick.c_str(), dest->nick.c_str(), parameters[1].c_str());