- user->WriteNumeric(470, "%s :%s is full, but has a circular redirect (+L), not following redirection to %s", user->nick.c_str(), cname, channel.c_str());
- return 1;
+ user->WriteNumeric(470, "%s * :You may not join this channel. A redirect is set, but you may not be redirected as it is a circular loop.", cname.c_str());
+ return MOD_RES_DENY;
+ }
+ /* We check the bool value here to make sure we have it enabled, if we don't then
+ usermode +L might be assigned to something else. */
+ if (UseUsermode && user->IsModeSet(re_u))
+ {
+ user->WriteNumeric(470, "%s %s :Force redirection stopped.", cname.c_str(), channel.c_str());
+ return MOD_RES_DENY;
+ }
+ else
+ {
+ user->WriteNumeric(470, "%s %s :You may not join this channel, so you are automatically being transferred to the redirect channel.", cname.c_str(), channel.c_str());
+ Channel::JoinUser(user, channel);
+ return MOD_RES_DENY;