summaryrefslogtreecommitdiff
path: root/src/modules/m_redirect.cpp
diff options
context:
space:
mode:
authorpeavey <peavey@e03df62e-2008-0410-955e-edbf42e46eb7>2007-03-02 21:39:39 +0000
committerpeavey <peavey@e03df62e-2008-0410-955e-edbf42e46eb7>2007-03-02 21:39:39 +0000
commitefdffbdc178336e027df594282ca60e109eb6166 (patch)
treea8e04f8aad2b1de8066352797501069ff2a0e701 /src/modules/m_redirect.cpp
parent943b3bd703bc081e3fe37a126b59732a35293d99 (diff)
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
Diffstat (limited to 'src/modules/m_redirect.cpp')
-rw-r--r--src/modules/m_redirect.cpp10
1 files changed, 10 insertions, 0 deletions
diff --git a/src/modules/m_redirect.cpp b/src/modules/m_redirect.cpp
index ae54ba137..18098d833 100644
--- a/src/modules/m_redirect.cpp
+++ b/src/modules/m_redirect.cpp
@@ -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;