Do not perform redirect on chained channel links, tell user channel is full and SNOTICE the offending channel(s).

git-svn-id: http://svn.inspircd.org/repository/trunk/inspircd@6616 e03df62e-2008-0410-955e-edbf42e46eb7
This commit is contained in:
peavey 2007-03-02 21:39:39 +00:00
parent 943b3bd703
commit efdffbdc17

View File

@ -126,6 +126,16 @@ class ModuleRedirect : public Module
if (chan->GetUserCounter() >= chan->limit)
{
std::string channel = chan->GetModeParameter('L');
/* sometimes broken ulines can make circular or chained +L, avoid this */
chanrec* destchan = NULL;
destchan = ServerInstance->FindChan(channel);
if (destchan && destchan->IsModeSet('L'))
{
ServerInstance->WriteOpers("*** %s has circular or chained +L to %s", chan->name, channel.c_str());
return 0;
}
user->WriteServ("470 %s :%s has become full, so you are automatically being transferred to the linked channel %s",user->nick,cname,channel.c_str());
chanrec::JoinUser(ServerInstance, user, channel.c_str(), false);
return 1;