diff options
Diffstat (limited to 'src/coremods')
-rw-r--r-- | src/coremods/core_xline/cmd_eline.cpp | 9 | ||||
-rw-r--r-- | src/coremods/core_xline/cmd_gline.cpp | 9 | ||||
-rw-r--r-- | src/coremods/core_xline/cmd_kline.cpp | 9 | ||||
-rw-r--r-- | src/coremods/core_xline/cmd_qline.cpp | 9 | ||||
-rw-r--r-- | src/coremods/core_xline/cmd_zline.cpp | 9 |
5 files changed, 20 insertions, 25 deletions
diff --git a/src/coremods/core_xline/cmd_eline.cpp b/src/coremods/core_xline/cmd_eline.cpp index 99794be3e..4a56ba7ea 100644 --- a/src/coremods/core_xline/cmd_eline.cpp +++ b/src/coremods/core_xline/cmd_eline.cpp @@ -69,14 +69,13 @@ CmdResult CommandEline::Handle(User* user, const Params& parameters) { if (!duration) { - ServerInstance->SNO->WriteToSnoMask('x',"%s added permanent E-line for %s: %s", user->nick.c_str(), target.c_str(), parameters[2].c_str()); + ServerInstance->SNO->WriteToSnoMask('x', "%s added permanent E-line for %s: %s", user->nick.c_str(), target.c_str(), parameters[2].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 E-line for %s, expires on %s: %s",user->nick.c_str(),target.c_str(), - timestr.c_str(), parameters[2].c_str()); + ServerInstance->SNO->WriteToSnoMask('x', "%s added timed E-line for %s, expires in %s (on %s): %s", + user->nick.c_str(), target.c_str(), InspIRCd::DurationString(duration).c_str(), + InspIRCd::TimeString(ServerInstance->Time() + duration).c_str(), parameters[2].c_str()); } } else diff --git a/src/coremods/core_xline/cmd_gline.cpp b/src/coremods/core_xline/cmd_gline.cpp index ae1ea5d6e..3e710978d 100644 --- a/src/coremods/core_xline/cmd_gline.cpp +++ b/src/coremods/core_xline/cmd_gline.cpp @@ -75,14 +75,13 @@ CmdResult CommandGline::Handle(User* user, const Params& parameters) { if (!duration) { - ServerInstance->SNO->WriteToSnoMask('x',"%s added permanent G-line for %s: %s",user->nick.c_str(),target.c_str(), parameters[2].c_str()); + ServerInstance->SNO->WriteToSnoMask('x', "%s added permanent G-line for %s: %s", user->nick.c_str(), target.c_str(), parameters[2].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 G-line for %s, expires on %s: %s",user->nick.c_str(),target.c_str(), - timestr.c_str(), parameters[2].c_str()); + ServerInstance->SNO->WriteToSnoMask('x', "%s added timed G-line for %s, expires in %s (on %s): %s", + user->nick.c_str(), target.c_str(), InspIRCd::DurationString(duration).c_str(), + InspIRCd::TimeString(ServerInstance->Time() + duration).c_str(), parameters[2].c_str()); } ServerInstance->XLines->ApplyLines(); diff --git a/src/coremods/core_xline/cmd_kline.cpp b/src/coremods/core_xline/cmd_kline.cpp index ad7511d56..1ec10aebb 100644 --- a/src/coremods/core_xline/cmd_kline.cpp +++ b/src/coremods/core_xline/cmd_kline.cpp @@ -75,14 +75,13 @@ CmdResult CommandKline::Handle(User* user, const Params& parameters) { if (!duration) { - ServerInstance->SNO->WriteToSnoMask('x',"%s added permanent K-line for %s: %s",user->nick.c_str(),target.c_str(), parameters[2].c_str()); + ServerInstance->SNO->WriteToSnoMask('x', "%s added permanent K-line for %s: %s", user->nick.c_str(), target.c_str(), parameters[2].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 K-line for %s, expires on %s: %s",user->nick.c_str(),target.c_str(), - timestr.c_str(), parameters[2].c_str()); + ServerInstance->SNO->WriteToSnoMask('x', "%s added timed K-line for %s, expires in %s (on %s): %s", + user->nick.c_str(), target.c_str(), InspIRCd::DurationString(duration).c_str(), + InspIRCd::TimeString(ServerInstance->Time() + duration).c_str(), parameters[2].c_str()); } ServerInstance->XLines->ApplyLines(); diff --git a/src/coremods/core_xline/cmd_qline.cpp b/src/coremods/core_xline/cmd_qline.cpp index 51f5bec16..afdc0431e 100644 --- a/src/coremods/core_xline/cmd_qline.cpp +++ b/src/coremods/core_xline/cmd_qline.cpp @@ -55,14 +55,13 @@ CmdResult CommandQline::Handle(User* user, const Params& parameters) { if (!duration) { - ServerInstance->SNO->WriteToSnoMask('x',"%s added permanent Q-line for %s: %s",user->nick.c_str(), parameters[0].c_str(), parameters[2].c_str()); + ServerInstance->SNO->WriteToSnoMask('x', "%s added permanent Q-line for %s: %s", user->nick.c_str(), parameters[0].c_str(), parameters[2].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 Q-line for %s, expires on %s: %s",user->nick.c_str(),parameters[0].c_str(), - timestr.c_str(), parameters[2].c_str()); + ServerInstance->SNO->WriteToSnoMask('x', "%s added timed Q-line 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()); } ServerInstance->XLines->ApplyLines(); } diff --git a/src/coremods/core_xline/cmd_zline.cpp b/src/coremods/core_xline/cmd_zline.cpp index 4aaa3061f..d32cde295 100644 --- a/src/coremods/core_xline/cmd_zline.cpp +++ b/src/coremods/core_xline/cmd_zline.cpp @@ -73,14 +73,13 @@ CmdResult CommandZline::Handle(User* user, const Params& parameters) { if (!duration) { - ServerInstance->SNO->WriteToSnoMask('x',"%s added permanent Z-line for %s: %s", user->nick.c_str(), ipaddr, parameters[2].c_str()); + ServerInstance->SNO->WriteToSnoMask('x', "%s added permanent Z-line for %s: %s", user->nick.c_str(), ipaddr, parameters[2].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 Z-line for %s, expires on %s: %s",user->nick.c_str(),ipaddr, - timestr.c_str(), parameters[2].c_str()); + ServerInstance->SNO->WriteToSnoMask('x', "%s added timed Z-line for %s, expires in %s (on %s): %s", + user->nick.c_str(), ipaddr, InspIRCd::DurationString(duration).c_str(), + InspIRCd::TimeString(ServerInstance->Time() + duration).c_str(), parameters[2].c_str()); } ServerInstance->XLines->ApplyLines(); } |