From cf3848fd361cdfaf8b5ef020627902aae1b141af Mon Sep 17 00:00:00 2001 From: brain Date: Sat, 5 Apr 2008 17:28:40 +0000 Subject: Same here git-svn-id: http://svn.inspircd.org/repository/trunk/inspircd@9362 e03df62e-2008-0410-955e-edbf42e46eb7 --- src/modules/m_spanningtree/delline.cpp | 12 +++++++++++- 1 file changed, 11 insertions(+), 1 deletion(-) (limited to 'src/modules/m_spanningtree') 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 &par if (params.size() < 2) return true; + std::string setter = ""; 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); } -- cgit v1.2.3