mirror of
https://github.com/inspircd/inspircd.git
synced 2025-03-10 02:59:01 -04:00
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:
parent
943b3bd703
commit
efdffbdc17
@ -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;
|
||||
|
Loading…
x
Reference in New Issue
Block a user