aboutsummaryrefslogtreecommitdiffstats
path: root/src/modules/m_shun.cpp
diff options
context:
space:
mode:
authorGravatar Sadie Powell2019-03-30 22:06:19 +0000
committerGravatar Sadie Powell2019-03-30 22:06:19 +0000
commit1fff2f7f87fa0e69494fe45902cfa315204d1e43 (patch)
treeb4f3eac01dc458cc7f3ab5b43a57c44d06044bed /src/modules/m_shun.cpp
parentRemove the flashpolicyd module. (diff)
parentRename OnClientProtocolPopulateTags to OnPopulateTags. (diff)
downloadinspircd++-1fff2f7f87fa0e69494fe45902cfa315204d1e43.tar.gz
inspircd++-1fff2f7f87fa0e69494fe45902cfa315204d1e43.tar.bz2
inspircd++-1fff2f7f87fa0e69494fe45902cfa315204d1e43.zip
Merge branch 'insp3' into master.
Diffstat (limited to 'src/modules/m_shun.cpp')
-rw-r--r--src/modules/m_shun.cpp11
1 files changed, 5 insertions, 6 deletions
diff --git a/src/modules/m_shun.cpp b/src/modules/m_shun.cpp
index f8b7f82bb..9e7529571 100644
--- a/src/modules/m_shun.cpp
+++ b/src/modules/m_shun.cpp
@@ -53,7 +53,7 @@ class CommandShun : public Command
public:
CommandShun(Module* Creator) : Command(Creator, "SHUN", 1, 3)
{
- flags_needed = 'o'; this->syntax = "<nick!user@hostmask> [<shun-duration>] :<reason>";
+ flags_needed = 'o'; this->syntax = "<nick!user@host> [<duration> :<reason>]";
}
CmdResult Handle(User* user, const Params& parameters) override
@@ -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