From 3794888ebf1fb19f404c22ff2d5333ccc6c3129e Mon Sep 17 00:00:00 2001 From: brain Date: Mon, 7 Aug 2006 22:14:34 +0000 Subject: Only local users can have angry monkeys and packs of wild dogs. These are local monkeys for local people! git-svn-id: http://svn.inspircd.org/repository/trunk/inspircd@4778 e03df62e-2008-0410-955e-edbf42e46eb7 --- src/modules/m_redirect.cpp | 25 ++++++++++++++----------- 1 file changed, 14 insertions(+), 11 deletions(-) diff --git a/src/modules/m_redirect.cpp b/src/modules/m_redirect.cpp index 8d2d152c2..a30073355 100644 --- a/src/modules/m_redirect.cpp +++ b/src/modules/m_redirect.cpp @@ -63,20 +63,23 @@ class Redirect : public ModeHandler if (c) { /* Fix by brain: Dont let a channel be linked to *itself* either */ - if ((c == channel) || (c->IsModeSet('L'))) + if (IS_LOCAL(source)) { - WriteServ(source->fd,"690 %s :Circular or chained +L to %s not allowed (Channel already has +L). Pack of wild dogs has been unleashed.",source->nick,parameter.c_str()); - parameter = ""; - return MODEACTION_DENY; - } - else - { - for (chan_hash::const_iterator i = chanlist.begin(); i != chanlist.end(); i++) + if ((c == channel) || (c->IsModeSet('L'))) + { + WriteServ(source->fd,"690 %s :Circular or chained +L to %s not allowed (Channel already has +L). Pack of wild dogs has been unleashed.",source->nick,parameter.c_str()); + parameter = ""; + return MODEACTION_DENY; + } + else { - if ((i->second != channel) && (i->second->IsModeSet('L')) && (irc::string(i->second->GetModeParameter('L').c_str()) == irc::string(channel->name))) + for (chan_hash::const_iterator i = chanlist.begin(); i != chanlist.end(); i++) { - WriteServ(source->fd,"690 %s :Circular or chained +L to %s not allowed (Already forwarded here from %s). Angry monkeys dispatched.",source->nick,parameter.c_str(),i->second->name); - return MODEACTION_DENY; + if ((i->second != channel) && (i->second->IsModeSet('L')) && (irc::string(i->second->GetModeParameter('L').c_str()) == irc::string(channel->name))) + { + WriteServ(source->fd,"690 %s :Circular or chained +L to %s not allowed (Already forwarded here from %s). Angry monkeys dispatched.",source->nick,parameter.c_str(),i->second->name); + return MODEACTION_DENY; + } } } } -- cgit v1.2.3