From d3c32dc04871cd56b5e1e88c5bfc1d33b8a4cb4a Mon Sep 17 00:00:00 2001 From: danieldg Date: Fri, 27 Feb 2009 01:05:05 +0000 Subject: 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 --- src/modules/m_spanningtree/kill.cpp | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) (limited to 'src') diff --git a/src/modules/m_spanningtree/kill.cpp b/src/modules/m_spanningtree/kill.cpp index b255e9cfc..8dc914d62 100644 --- a/src/modules/m_spanningtree/kill.cpp +++ b/src/modules/m_spanningtree/kill.cpp @@ -40,9 +40,12 @@ bool TreeSocket::RemoteKill(const std::string &prefix, std::deque & 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; -- cgit v1.2.3