From 7f318a332523869a1abb7125c9fe9d09cc048409 Mon Sep 17 00:00:00 2001 From: danieldg Date: Mon, 23 Mar 2009 03:32:01 +0000 Subject: Check IsBanned even when the ban list is empty, so that module hooks get called. Fixes bug #800, reported by Taros git-svn-id: http://svn.inspircd.org/repository/trunk/inspircd@11248 e03df62e-2008-0410-955e-edbf42e46eb7 --- src/channels.cpp | 9 +++------ 1 file changed, 3 insertions(+), 6 deletions(-) (limited to 'src/channels.cpp') diff --git a/src/channels.cpp b/src/channels.cpp index 8d1c934e0..19899d300 100644 --- a/src/channels.cpp +++ b/src/channels.cpp @@ -393,13 +393,10 @@ Channel* Channel::JoinUser(InspIRCd* Instance, User *user, const char* cn, bool } } - if (Ptr->bans.size()) + if (Ptr->IsBanned(user) && !can_bypass) { - if (Ptr->IsBanned(user) && !can_bypass) - { - user->WriteNumeric(ERR_BANNEDFROMCHAN, "%s %s :Cannot join channel (You're banned)",user->nick.c_str(), Ptr->name.c_str()); - return NULL; - } + user->WriteNumeric(ERR_BANNEDFROMCHAN, "%s %s :Cannot join channel (You're banned)",user->nick.c_str(), Ptr->name.c_str()); + return NULL; } /* -- cgit v1.2.3