aboutsummaryrefslogtreecommitdiffstats
path: root/src/modules/m_shun.cpp
diff options
context:
space:
mode:
authorGravatar Matt Schatz2019-02-17 02:23:32 -0700
committerGravatar Peter Powell2019-02-18 09:17:38 +0000
commit755a32c75101c4df0e5699db558785fc0dbc1973 (patch)
treea5e789f122881bf1ed7dc124da779600bb3fe13c /src/modules/m_shun.cpp
parentX-line expiries: use the new DurationString() function. (diff)
downloadinspircd++-755a32c75101c4df0e5699db558785fc0dbc1973.tar.gz
inspircd++-755a32c75101c4df0e5699db558785fc0dbc1973.tar.bz2
inspircd++-755a32c75101c4df0e5699db558785fc0dbc1973.zip
Start using DurationString() in X-line additions and
a few other modules where it fits better than just showing seconds.
Diffstat (limited to 'src/modules/m_shun.cpp')
-rw-r--r--src/modules/m_shun.cpp9
1 files changed, 4 insertions, 5 deletions
diff --git a/src/modules/m_shun.cpp b/src/modules/m_shun.cpp
index e54156da6..b4e538624 100644
--- a/src/modules/m_shun.cpp
+++ b/src/modules/m_shun.cpp
@@ -110,15 +110,14 @@ class CommandShun : public Command
{
if (!duration)
{
- ServerInstance->SNO->WriteToSnoMask('x',"%s added permanent SHUN for %s: %s",
+ ServerInstance->SNO->WriteToSnoMask('x', "%s added permanent SHUN for %s: %s",
user->nick.c_str(), target.c_str(), expr.c_str());
}
else
{
- time_t c_requires_crap = duration + ServerInstance->Time();
- std::string timestr = InspIRCd::TimeString(c_requires_crap);
- ServerInstance->SNO->WriteToSnoMask('x', "%s added timed SHUN for %s to expire on %s: %s",
- user->nick.c_str(), target.c_str(), timestr.c_str(), expr.c_str());
+ ServerInstance->SNO->WriteToSnoMask('x', "%s added timed SHUN for %s to expire in %s (on %s): %s",
+ user->nick.c_str(), target.c_str(), InspIRCd::DurationString(duration).c_str(),
+ InspIRCd::TimeString(ServerInstance->Time() + duration).c_str(), expr.c_str());
}
}
else