summaryrefslogtreecommitdiff
path: root/src/modules/m_shun.cpp
diff options
context:
space:
mode:
authorMatt Schatz <genius3000@g3k.solutions>2019-02-17 02:23:32 -0700
committerPeter Powell <petpow@saberuk.com>2019-02-18 09:17:38 +0000
commit755a32c75101c4df0e5699db558785fc0dbc1973 (patch)
treea5e789f122881bf1ed7dc124da779600bb3fe13c /src/modules/m_shun.cpp
parentff7bebe90c6b348b0df28864e4954d04bd17256b (diff)
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