aboutsummaryrefslogtreecommitdiff
path: root/src/xline.cpp
diff options
context:
space:
mode:
authorGravatar Sadie Powell2023-07-25 10:10:02 +0100
committerGravatar Sadie Powell2023-07-25 10:10:02 +0100
commitccfa04c4d2d738b13fdf8ba013b317ca3f593e16 (patch)
tree470a526a0d62a0b914f4dc05f5860cae8dd4eb61 /src/xline.cpp
parentAlso allow suffixing with -line[d] if an X-line is two characters. (diff)
Fix some cases missed in the previous commit.
Diffstat (limited to 'src/xline.cpp')
-rw-r--r--src/xline.cpp5
1 files changed, 2 insertions, 3 deletions
diff --git a/src/xline.cpp b/src/xline.cpp
index effd3edd8..43e7f1479 100644
--- a/src/xline.cpp
+++ b/src/xline.cpp
@@ -559,7 +559,7 @@ void XLine::DefaultApply(User* u, bool bancache)
{ "created", Time::ToString(set_time) },
{ "duration", Duration::ToString(duration) },
{ "expiry", Time::ToString(expiry) },
- { "fulltype", type.length() == 1 ? type + "-lined" : type },
+ { "fulltype", type.length() <= 2 ? type + "-lined" : type },
{ "reason", reason },
{ "remaining", Duration::ToString(ServerInstance->Time() - expiry) },
{ "setter", source },
@@ -705,9 +705,8 @@ void ELine::OnAdd()
void XLine::DisplayExpiry()
{
- bool onechar = (type.length() == 1);
ServerInstance->SNO.WriteToSnoMask('x', "Removing an expired {}{} on {} (set by {} {} ago): {}",
- type, (onechar ? "-line" : ""), Displayable(), source,
+ type, (type.length() <= 2 ? "-line" : ""), Displayable(), source,
Duration::ToString(ServerInstance->Time() - set_time), reason);
}