diff options
author | danieldg <danieldg@e03df62e-2008-0410-955e-edbf42e46eb7> | 2009-03-23 03:32:01 +0000 |
---|---|---|
committer | danieldg <danieldg@e03df62e-2008-0410-955e-edbf42e46eb7> | 2009-03-23 03:32:01 +0000 |
commit | 7f318a332523869a1abb7125c9fe9d09cc048409 (patch) | |
tree | f0e1744202d12e95efa4ac3886571eafc4f217a4 /src/channels.cpp | |
parent | e6edce78abc2cd269b8d77237ac26cdec7465e43 (diff) |
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
Diffstat (limited to 'src/channels.cpp')
-rw-r--r-- | src/channels.cpp | 9 |
1 files changed, 3 insertions, 6 deletions
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; } /* |