aboutsummaryrefslogtreecommitdiff
path: root/modules/joinflood.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'modules/joinflood.cpp')
-rw-r--r--modules/joinflood.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/modules/joinflood.cpp b/modules/joinflood.cpp
index 783ed6f9e..6a9be0748 100644
--- a/modules/joinflood.cpp
+++ b/modules/joinflood.cpp
@@ -201,7 +201,7 @@ public:
f->clear();
f->lock();
- PrefixMode* pm = ServerInstance->Modes.FindNearestPrefixMode(notifyrank);
+ auto* pm = notifyrank ? ServerInstance->Modes.FindNearestPrefixMode(notifyrank) : nullptr;
memb->chan->WriteNotice(FMT::format("This channel has been closed to new users for {} because there have been more than {} joins in {}.",
Duration::ToLongString(duration), f->joins, Duration::ToLongString(f->secs)), pm ? pm->GetPrefix() : 0);
}