summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorRobby <robby@chatbelgie.be>2019-04-27 03:43:48 +0200
committerPeter Powell <petpow@saberuk.com>2019-04-28 00:02:53 +0100
commit23033e286fdbc47525b21f257d4828da653b9b42 (patch)
treef1c9033224d209487caf95d3acbaa60f9c262244 /src
parent095d0e615474a08455c6bc186fbdf8b1bc753e39 (diff)
m_connectban and m_svshold: Use DurationString() in X-line messages.
Diffstat (limited to 'src')
-rw-r--r--src/modules/m_connectban.cpp5
-rw-r--r--src/modules/m_svshold.cpp6
2 files changed, 5 insertions, 6 deletions
diff --git a/src/modules/m_connectban.cpp b/src/modules/m_connectban.cpp
index 20121f5f9..b3cabd18a 100644
--- a/src/modules/m_connectban.cpp
+++ b/src/modules/m_connectban.cpp
@@ -82,9 +82,8 @@ class ModuleConnectBan : public Module
}
ServerInstance->XLines->ApplyLines();
std::string maskstr = mask.str();
- std::string timestr = InspIRCd::TimeString(zl->expiry);
- ServerInstance->SNO->WriteGlobalSno('x',"Module m_connectban added Z-line on %s to expire on %s: Connect flooding",
- maskstr.c_str(), timestr.c_str());
+ ServerInstance->SNO->WriteGlobalSno('x', "Z-line added by module m_connectban on %s to expire in %s (on %s): Connect flooding",
+ maskstr.c_str(), InspIRCd::DurationString(zl->duration).c_str(), InspIRCd::TimeString(zl->expiry).c_str());
ServerInstance->SNO->WriteGlobalSno('a', "Connect flooding from IP range %s (%d)", maskstr.c_str(), threshold);
connects.erase(i);
}
diff --git a/src/modules/m_svshold.cpp b/src/modules/m_svshold.cpp
index dbf621932..c1249a3bd 100644
--- a/src/modules/m_svshold.cpp
+++ b/src/modules/m_svshold.cpp
@@ -148,9 +148,9 @@ class CommandSvshold : public Command
}
else
{
- time_t c_requires_crap = duration + ServerInstance->Time();
- std::string timestr = InspIRCd::TimeString(c_requires_crap);
- ServerInstance->SNO->WriteGlobalSno('x', "%s added timed SVSHOLD for %s, expires on %s: %s", user->nick.c_str(), parameters[0].c_str(), timestr.c_str(), parameters[2].c_str());
+ ServerInstance->SNO->WriteGlobalSno('x', "%s added timed SVSHOLD for %s, expires in %s (on %s): %s",
+ user->nick.c_str(), parameters[0].c_str(), InspIRCd::DurationString(duration).c_str(),
+ InspIRCd::TimeString(ServerInstance->Time() + duration).c_str(), parameters[2].c_str());
}
}
else