From eb7a5f24e0840c7c844e03e70f6c342b9dc544f7 Mon Sep 17 00:00:00 2001 From: Daniel De Graaf Date: Wed, 4 Aug 2010 18:03:15 -0400 Subject: Change m_redirect to redirect on any denied join --- src/channels.cpp | 20 +++++++------------- 1 file changed, 7 insertions(+), 13 deletions(-) (limited to 'src/channels.cpp') diff --git a/src/channels.cpp b/src/channels.cpp index fa70d3a05..a7e9b1ed3 100644 --- a/src/channels.cpp +++ b/src/channels.cpp @@ -280,12 +280,6 @@ Channel* Channel::JoinUser(User *user, const std::string& cn, bool override, con if (IS_LOCAL(user) && override == false) { FOR_EACH_MOD(OnCheckJoin, (perm)); - if (perm.result == MOD_RES_DENY) - { - if (!perm.reason.empty()) - user->SendText(perm.reason); - return NULL; - } if (perm.result == MOD_RES_PASSTHRU) { std::string ckey = Ptr->GetModeParameter('k'); @@ -316,14 +310,14 @@ Channel* Channel::JoinUser(User *user, const std::string& cn, bool override, con perm.result = MOD_RES_DENY; perm.ErrorNumeric(ERR_BANNEDFROMCHAN, "%s :Cannot join channel (You're banned)", Ptr->name.c_str()); } + } - FOR_EACH_MOD(OnPermissionCheck, (perm)); - if (perm.result == MOD_RES_DENY) - { - if (!perm.reason.empty()) - user->SendText(perm.reason); - return NULL; - } + FOR_EACH_MOD(OnPermissionCheck, (perm)); + if (perm.result == MOD_RES_DENY) + { + if (!perm.reason.empty()) + user->SendText(perm.reason); + return NULL; } } } -- cgit v1.3.1-10-gc9f91