summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorbrain <brain@e03df62e-2008-0410-955e-edbf42e46eb7>2006-01-21 23:30:27 +0000
committerbrain <brain@e03df62e-2008-0410-955e-edbf42e46eb7>2006-01-21 23:30:27 +0000
commitf2ee212c2ba2558a65078b6cd65adb463d047920 (patch)
tree9cf5889df0cf62abb39439d02569e091c73e7c95 /src
parent265ff48624afc2a008d1f688ca1f50ea898cfa98 (diff)
Fix to m_redirect to prevent circular link to self
git-svn-id: http://svn.inspircd.org/repository/trunk/inspircd@2823 e03df62e-2008-0410-955e-edbf42e46eb7
Diffstat (limited to 'src')
-rw-r--r--src/modules/m_redirect.cpp3
1 files changed, 2 insertions, 1 deletions
diff --git a/src/modules/m_redirect.cpp b/src/modules/m_redirect.cpp
index 356c0e435..bedb90077 100644
--- a/src/modules/m_redirect.cpp
+++ b/src/modules/m_redirect.cpp
@@ -48,7 +48,8 @@ class ModuleRedirect : public Module
chanrec* c = Srv->FindChannel(ChanToJoin);
if (c)
{
- if (c->IsCustomModeSet('L'))
+ /* Fix by brain: Dont let a channel be linked to *itself* either */
+ if ((c == target) || (c->IsCustomModeSet('L')))
{
WriteServ(user->fd,"690 %s :Circular redirection, mode +L to %s not allowed.",user->nick,params[0].c_str());
return 0;