diff options
author | brain <brain@e03df62e-2008-0410-955e-edbf42e46eb7> | 2005-12-06 17:15:01 +0000 |
---|---|---|
committer | brain <brain@e03df62e-2008-0410-955e-edbf42e46eb7> | 2005-12-06 17:15:01 +0000 |
commit | c893bedf12805fe4a2ca980d524ad8b3a16fe923 (patch) | |
tree | eafdef1061e5529f687ebe77dd93a1886d0024b4 /src/modules | |
parent | f1a3fd1d46db7ac33637336e6ba479f1d3c55a17 (diff) |
Made remote kill safer
git-svn-id: http://svn.inspircd.org/repository/trunk/inspircd@2235 e03df62e-2008-0410-955e-edbf42e46eb7
Diffstat (limited to 'src/modules')
-rw-r--r-- | src/modules/m_spanningtree.cpp | 13 |
1 files changed, 7 insertions, 6 deletions
diff --git a/src/modules/m_spanningtree.cpp b/src/modules/m_spanningtree.cpp index 9fed5da60..53d5bb014 100644 --- a/src/modules/m_spanningtree.cpp +++ b/src/modules/m_spanningtree.cpp @@ -1203,19 +1203,20 @@ class TreeSocket : public InspSocket userrec* who = Srv->FindNick(nick); if (who) { - /* Append kill source, if we don't have one */ - if (*(params[1].c_str()) != '[') - { - params[1] = "[" + std::string(u->server) + "] Killed (" + params[1] +")"; - } + /* Prepend kill source, if we don't have one */ std::string sourceserv = prefix; if (u) { sourceserv = u->server; } + if (*(params[1].c_str()) != '[') + { + params[1] = "[" + sourceserv + "] Killed (" + params[1] +")"; + } + std::string reason = params[1]; params[1] = ":" + params[1]; DoOneToAllButSender(prefix,"KILL",params,sourceserv); - Srv->QuitUser(who,params[1]); + Srv->QuitUser(who,reason); } return true; } |