Fix SID-sourced KILL being displayed to killee as from SID not from server name

git-svn-id: http://svn.inspircd.org/repository/trunk/inspircd@11155 e03df62e-2008-0410-955e-edbf42e46eb7
This commit is contained in:
danieldg 2009-02-27 01:05:05 +00:00
parent e75c523e59
commit d3c32dc048

View File

@ -40,9 +40,12 @@ bool TreeSocket::RemoteKill(const std::string &prefix, std::deque<std::string> &
std::string reason = params[1];
params[1] = ":" + params[1];
Utils->DoOneToAllButSender(prefix,"KILL",params,prefix);
// NOTE: This is safe with kill hiding on, as RemoteKill is only reached if we have a server prefix.
// in short this is not executed for USERS.
who->Write(":%s KILL %s :%s (%s)", prefix.c_str(), who->nick.c_str(), prefix.c_str(), reason.c_str());
TreeServer* src = Utils->FindServer(prefix);
if (src)
{
// this shouldn't ever be null, but it doesn't hurt to check
who->Write(":%s KILL %s :%s (%s)", src->GetName().c_str(), who->nick.c_str(), src->GetName().c_str(), reason.c_str());
}
this->ServerInstance->Users->QuitUser(who, reason);
}
return true;