From 63d3e056b742598f48ba9a8df216b06117a37910 Mon Sep 17 00:00:00 2001 From: danieldg Date: Mon, 14 Sep 2009 17:09:16 +0000 Subject: Introduce "X" snomask for remote *:line messages [patch by jackmcbarn] git-svn-id: http://svn.inspircd.org/repository/trunk/inspircd@11721 e03df62e-2008-0410-955e-edbf42e46eb7 --- src/modules/m_svshold.cpp | 12 +++++++++++- 1 file changed, 11 insertions(+), 1 deletion(-) (limited to 'src/modules/m_svshold.cpp') diff --git a/src/modules/m_svshold.cpp b/src/modules/m_svshold.cpp index cbe980d05..e75f1d150 100644 --- a/src/modules/m_svshold.cpp +++ b/src/modules/m_svshold.cpp @@ -100,7 +100,7 @@ class CommandSvshold : public Command { if (ServerInstance->XLines->DelLine(parameters[0].c_str(), "SVSHOLD", user)) { - ServerInstance->SNO->WriteToSnoMask('x',"%s Removed SVSHOLD on %s.",user->nick.c_str(),parameters[0].c_str()); + ServerInstance->SNO->WriteToSnoMask('x',"%s removed SVSHOLD on %s",user->nick.c_str(),parameters[0].c_str()); } else { @@ -128,6 +128,16 @@ class CommandSvshold : public Command { if (ServerInstance->XLines->AddLine(r, user)) { + if (!duration) + { + ServerInstance->SNO->WriteGlobalSno('x', "%s added permanent SVSHOLD for %s: %s", user->nick.c_str(), parameters[0].c_str(), parameters[2].c_str()); + } + else + { + time_t c_requires_crap = duration + ServerInstance->Time(); + ServerInstance->SNO->WriteGlobalSno('x', "%s added timed SVSHOLD for %s, expires on %s: %s", user->nick.c_str(), parameters[0].c_str(), ServerInstance->TimeString(c_requires_crap).c_str(), parameters[2].c_str()); + } + ServerInstance->XLines->ApplyLines(); } else -- cgit v1.2.3