summaryrefslogtreecommitdiff
path: root/src/channels.cpp
diff options
context:
space:
mode:
authorSadie Powell <sadie@witchery.services>2021-11-30 10:54:10 +0000
committerSadie Powell <sadie@witchery.services>2021-11-30 11:04:19 +0000
commit754c82d047b80c30ff2f775d32e8b9b054049ebd (patch)
treeeb1abbc79af82320c34805c8282914609476a973 /src/channels.cpp
parent17fa704278a99aeac4e59df1bf58e63d88357788 (diff)
Remove undefined behaviour around checking if this is null.
Diffstat (limited to 'src/channels.cpp')
-rw-r--r--src/channels.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/channels.cpp b/src/channels.cpp
index b2af559ae..77f23ea45 100644
--- a/src/channels.cpp
+++ b/src/channels.cpp
@@ -912,7 +912,7 @@ bool Channel::CheckKick(User *user)
return false;
if (mask.empty())
- mask = this->ci->GetIdealBan(user);
+ mask = this->ci ? this->ci->GetIdealBan(user) : "*!*@" + user->GetDisplayedHost();
if (reason.empty())
reason = Language::Translate(user->Account(), CHAN_NOT_ALLOWED_TO_JOIN);