diff options
Diffstat (limited to 'src')
-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 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; |