summaryrefslogtreecommitdiff
path: root/src/channels.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/channels.cpp')
-rw-r--r--src/channels.cpp9
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;
}
/*