diff options
| author | 2022-04-05 23:37:33 +0100 | |
|---|---|---|
| committer | 2022-04-05 23:37:33 +0100 | |
| commit | 72372136c46e1863ba09140f1d79e2e53270b86b (patch) | |
| tree | 05468ef0c90e6caa9eeb4ce9b74fd88f77c901be /src/modules/m_rline.cpp | |
| parent | Release v4.0.0 alpha 9. (diff) | |
| parent | Use consistent xline messages locally (diff) | |
Merge branch 'insp3' into master.
Diffstat (limited to 'src/modules/m_rline.cpp')
| -rw-r--r-- | src/modules/m_rline.cpp | 20 |
1 files changed, 14 insertions, 6 deletions
diff --git a/src/modules/m_rline.cpp b/src/modules/m_rline.cpp index 026acd7fb..01a022e83 100644 --- a/src/modules/m_rline.cpp +++ b/src/modules/m_rline.cpp @@ -68,12 +68,20 @@ public: { if (ZlineOnMatch) { - ZLine* zl = new ZLine(ServerInstance->Time(), duration ? expiry - ServerInstance->Time() : 0, ServerInstance->Config->ServerName.c_str(), reason.c_str(), u->GetIPString()); + ZLine* zl = new ZLine(ServerInstance->Time(), duration ? expiry - ServerInstance->Time() : 0, MODNAME "@" + ServerInstance->Config->ServerName, reason.c_str(), u->GetIPString()); if (ServerInstance->XLines->AddLine(zl, NULL)) { - std::string expirystr = zl->duration ? InspIRCd::Format(" to expire in %s (on %s)", InspIRCd::DurationString(zl->duration).c_str(), InspIRCd::TimeString(zl->expiry).c_str()) : ""; - ServerInstance->SNO.WriteToSnoMask('x', "Z-line added due to R-line match on %s%s: %s", - zl->ipaddr.c_str(), expirystr.c_str(), zl->reason.c_str()); + if (!duration) + { + ServerInstance->SNO.WriteToSnoMask('x', "%s added a permanent Z-line on %s: %s", + zl->source.c_str(), u->GetIPString().c_str(), zl->reason.c_str()); + } + else + { + ServerInstance->SNO.WriteToSnoMask('x', "%s added a timed Z-line on %s, expires in %s (on %s): %s", + zl->source.c_str(), u->GetIPString().c_str(), InspIRCd::DurationString(zl->duration).c_str(), + InspIRCd::TimeString(zl->duration).c_str(), zl->reason.c_str()); + } added_zline = true; } else @@ -166,11 +174,11 @@ public: { if (!duration) { - ServerInstance->SNO.WriteToSnoMask('x', "%s added permanent R-line for %s: %s", user->nick.c_str(), parameters[0].c_str(), parameters[2].c_str()); + ServerInstance->SNO.WriteToSnoMask('x', "%s added a permanent R-line on %s: %s", user->nick.c_str(), parameters[0].c_str(), parameters[2].c_str()); } else { - ServerInstance->SNO.WriteToSnoMask('x', "%s added timed R-line for %s, expires in %s (on %s): %s", + ServerInstance->SNO.WriteToSnoMask('x', "%s added a timed R-line on %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()); } |
