summaryrefslogtreecommitdiff
path: root/src/regchannel.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/regchannel.cpp
parent17fa704278a99aeac4e59df1bf58e63d88357788 (diff)
Remove undefined behaviour around checking if this is null.
Diffstat (limited to 'src/regchannel.cpp')
-rw-r--r--src/regchannel.cpp3
1 files changed, 1 insertions, 2 deletions
diff --git a/src/regchannel.cpp b/src/regchannel.cpp
index bd6fcbbf0..ffdf55bce 100644
--- a/src/regchannel.cpp
+++ b/src/regchannel.cpp
@@ -629,8 +629,7 @@ void ChannelInfo::ClearLevels()
Anope::string ChannelInfo::GetIdealBan(User *u) const
{
- int bt = this ? this->bantype : -1;
- switch (bt)
+ switch (this->bantype)
{
case 0:
return "*!" + u->GetVIdent() + "@" + u->GetDisplayedHost();