summaryrefslogtreecommitdiff
path: root/src/modules
diff options
context:
space:
mode:
authorspecial <special@e03df62e-2008-0410-955e-edbf42e46eb7>2007-10-07 05:50:04 +0000
committerspecial <special@e03df62e-2008-0410-955e-edbf42e46eb7>2007-10-07 05:50:04 +0000
commit74529bd97c284bb0227451a006cfa6e3079f61b9 (patch)
treef6146153cea7c0650c8440e8388805cc969b989e /src/modules
parent122660bd290687b19b7f5b2831e82e55be3b437c (diff)
Fixed bug #434 (cycle allows bypassing modes for users outside of the channel). Patch by dz
git-svn-id: http://svn.inspircd.org/repository/trunk/inspircd@8131 e03df62e-2008-0410-955e-edbf42e46eb7
Diffstat (limited to 'src/modules')
-rw-r--r--src/modules/m_cycle.cpp10
1 files changed, 8 insertions, 2 deletions
diff --git a/src/modules/m_cycle.cpp b/src/modules/m_cycle.cpp
index 295e73208..effc08115 100644
--- a/src/modules/m_cycle.cpp
+++ b/src/modules/m_cycle.cpp
@@ -38,7 +38,13 @@ class cmd_cycle : public command_t
reason = reason + ": " + parameters[1];
}
- if (channel)
+ if (!channel)
+ {
+ user->WriteServ("403 %s %s :No such channel", user->nick, channel->name);
+ return CMD_FAILURE;
+ }
+
+ if (channel->HasUser(user))
{
/*
* technically, this is only ever sent locally, but pays to be safe ;p
@@ -63,7 +69,7 @@ class cmd_cycle : public command_t
}
else
{
- user->WriteServ("NOTICE %s :*** You are not on this channel", user->nick);
+ user->WriteServ("442 %s %s :You're not on that channel", user->nick, channel->name);
}
return CMD_FAILURE;