summaryrefslogtreecommitdiff
path: root/src/modules/m_svshold.cpp
diff options
context:
space:
mode:
authordanieldg <danieldg@e03df62e-2008-0410-955e-edbf42e46eb7>2009-09-14 17:09:16 +0000
committerdanieldg <danieldg@e03df62e-2008-0410-955e-edbf42e46eb7>2009-09-14 17:09:16 +0000
commit63d3e056b742598f48ba9a8df216b06117a37910 (patch)
treec1bca3105a9bffe8be14a0fd4c9f6ca4d837b711 /src/modules/m_svshold.cpp
parent7c8a2de390271eb39248e12c925238725504f74d (diff)
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
Diffstat (limited to 'src/modules/m_svshold.cpp')
-rw-r--r--src/modules/m_svshold.cpp12
1 files changed, 11 insertions, 1 deletions
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