summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorbrain <brain@e03df62e-2008-0410-955e-edbf42e46eb7>2008-04-05 17:28:40 +0000
committerbrain <brain@e03df62e-2008-0410-955e-edbf42e46eb7>2008-04-05 17:28:40 +0000
commitcf3848fd361cdfaf8b5ef020627902aae1b141af (patch)
tree97c25e0be4abc332d773d0fe191250de417e5d07 /src
parentd8531d95ac32a7863a85f41589cd96f174648120 (diff)
Same here
git-svn-id: http://svn.inspircd.org/repository/trunk/inspircd@9362 e03df62e-2008-0410-955e-edbf42e46eb7
Diffstat (limited to 'src')
-rw-r--r--src/modules/m_spanningtree/delline.cpp12
1 files changed, 11 insertions, 1 deletions
diff --git a/src/modules/m_spanningtree/delline.cpp b/src/modules/m_spanningtree/delline.cpp
index a32136258..cb8a9dadc 100644
--- a/src/modules/m_spanningtree/delline.cpp
+++ b/src/modules/m_spanningtree/delline.cpp
@@ -26,12 +26,22 @@ bool TreeSocket::DelLine(const std::string &prefix, std::deque<std::string> &par
if (params.size() < 2)
return true;
+ std::string setter = "<unknown>";
User* user = Instance->FindNick(prefix);
+ if (user)
+ setter = user->nick;
+ else
+ {
+ TreeServer* t = Utils->FindServer(prefix);
+ if (t)
+ setter = t->GetName().c_str();
+ }
+
/* NOTE: No check needed on 'user', this function safely handles NULL */
if (Instance->XLines->DelLine(params[0].c_str(), params[1], user))
{
- this->Instance->SNO->WriteToSnoMask('x',"%s removed %s%s on %s.", prefix.c_str(),
+ this->Instance->SNO->WriteToSnoMask('x',"%s removed %s%s on %s.", setter.c_str(),
params[0].c_str(), params[0].length() == 1 ? "LINE" : "", params[1].c_str());
Utils->DoOneToAllButSender(prefix,"DELLINE", params, prefix);
}