]> git.netwichtig.de Git - user/henk/code/inspircd.git/blobdiff - src/modules/m_shun.cpp
Start using DurationString() in X-line additions and
[user/henk/code/inspircd.git] / src / modules / m_shun.cpp
index e54156da6aff01d9fa5262a9a9c7e7f34a4b22a2..b4e5386247e779118b6e5e52f5e0a5e5ba9ef947 100644 (file)
@@ -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