X-Git-Url: https://git.netwichtig.de/gitweb/?a=blobdiff_plain;f=src%2Fmodules%2Fm_banredirect.cpp;h=9fa36b5169b045572bb69d8e98505180e05fc0aa;hb=4e7c9f5a9257723765f9994aff90440a0b6cf3c9;hp=1764e6f56689b7f4dfb74af3804c6a2a9aa24aa1;hpb=f2acdbc3820f0f4f5ef76a0a64e73d2a320df91f;p=user%2Fhenk%2Fcode%2Finspircd.git diff --git a/src/modules/m_banredirect.cpp b/src/modules/m_banredirect.cpp index 1764e6f56..9fa36b516 100644 --- a/src/modules/m_banredirect.cpp +++ b/src/modules/m_banredirect.cpp @@ -12,10 +12,6 @@ */ #include "inspircd.h" -#include "mode.h" -#include "users.h" -#include "channels.h" -#include "modules.h" #include "u_listmode.h" /* $ModDesc: Allows an extended ban (+b) syntax redirecting banned users to another channel */ @@ -66,7 +62,7 @@ class BanRedirect : public ModeWatcher std::string::iterator start_pos = param.begin(); long maxbans = channel->GetMaxBans(); - if(channel->bans.size() > static_cast(maxbans)) + if(adding && (channel->bans.size() > static_cast(maxbans))) { source->WriteServ("478 %s %s :Channel ban list for %s is full (maximum entries for this channel is %d)", source->nick, channel->name, channel->name, maxbans); return false; @@ -309,7 +305,8 @@ class ModuleBanRedirect : public Module } else { - user->WriteServ("470 %s :You are banned from %s. You are being automatically redirected to %s", user->nick, chan->name, redir->targetchan.c_str()); + user->WriteServ("474 %s %s :Cannot join channel (You are banned)", user->nick, chan->name); + user->WriteServ("470 %s :You are being automatically redirected to %s", user->nick, redir->targetchan.c_str()); nofollow = true; chanrec::JoinUser(ServerInstance, user, redir->targetchan.c_str(), false, "", ServerInstance->Time(true)); nofollow = false;