diff options
| author | 2010-08-04 18:03:15 -0400 | |
|---|---|---|
| committer | 2010-08-04 18:03:15 -0400 | |
| commit | eb7a5f24e0840c7c844e03e70f6c342b9dc544f7 (patch) | |
| tree | 94dacff9ab2fbdafaedcd03cbef567e62f858107 /src/channels.cpp | |
| parent | Fix $md5pass and $sha256pass in SQL queries (diff) | |
Change m_redirect to redirect on any denied join
Diffstat (limited to 'src/channels.cpp')
| -rw-r--r-- | src/channels.cpp | 20 |
1 files changed, 7 insertions, 13 deletions
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; } } } |
