diff options
| author | 2007-10-07 05:52:39 +0000 | |
|---|---|---|
| committer | 2007-10-07 05:52:39 +0000 | |
| commit | f973d794f6493b043b5cfd92d0f036dc6d439959 (patch) | |
| tree | cb98cded8e5cc0c4778c330bbbbc442fddda60d2 /src/modules/m_cycle.cpp | |
| parent | Backport the changes to CallHandler to fix an issue Andy Church and Casey are... (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/branches/1_1_stable@8133 e03df62e-2008-0410-955e-edbf42e46eb7
Diffstat (limited to 'src/modules/m_cycle.cpp')
| -rw-r--r-- | src/modules/m_cycle.cpp | 10 |
1 files changed, 8 insertions, 2 deletions
diff --git a/src/modules/m_cycle.cpp b/src/modules/m_cycle.cpp index 0e3bd7ee2..05c6460c0 100644 --- a/src/modules/m_cycle.cpp +++ b/src/modules/m_cycle.cpp @@ -40,7 +40,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, parameters[0]); + return CMD_FAILURE; + } + + if (channel->HasUser(user)) { /* * technically, this is only ever sent locally, but pays to be safe ;p @@ -65,7 +71,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; |
