summaryrefslogtreecommitdiff
path: root/src/channels.cpp
diff options
context:
space:
mode:
authorPeter Powell <petpow@saberuk.com>2017-12-03 17:16:28 +0000
committerPeter Powell <petpow@saberuk.com>2017-12-10 12:38:45 +0000
commit98372c3cf2c1455e41c388d822876a4d146ae76d (patch)
treee1f3403a7f16fab366e0304da84d9c10daf1a20e /src/channels.cpp
parent150258b1f110aad58c8882b76474a4ceb3b2ab97 (diff)
Extract RFC modes from the core to core_channel and core_user.
Diffstat (limited to 'src/channels.cpp')
-rw-r--r--src/channels.cpp6
1 files changed, 6 insertions, 0 deletions
diff --git a/src/channels.cpp b/src/channels.cpp
index 118a413a8..3bc58505c 100644
--- a/src/channels.cpp
+++ b/src/channels.cpp
@@ -349,6 +349,9 @@ bool Channel::IsBanned(User* user)
return (result == MOD_RES_DENY);
ListModeBase* banlm = static_cast<ListModeBase*>(*ban);
+ if (!banlm)
+ return false;
+
const ListModeBase::ModeList* bans = banlm->GetList(this);
if (bans)
{
@@ -397,6 +400,9 @@ ModResult Channel::GetExtBanStatus(User *user, char type)
return rv;
ListModeBase* banlm = static_cast<ListModeBase*>(*ban);
+ if (!banlm)
+ return MOD_RES_PASSTHRU;
+
const ListModeBase::ModeList* bans = banlm->GetList(this);
if (bans)
{