From 74529bd97c284bb0227451a006cfa6e3079f61b9 Mon Sep 17 00:00:00 2001 From: special Date: Sun, 7 Oct 2007 05:50:04 +0000 Subject: 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 --- src/modules/m_cycle.cpp | 10 ++++++++-- 1 file 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; -- cgit v1.2.3