summaryrefslogtreecommitdiff
path: root/src/commands
diff options
context:
space:
mode:
authorattilamolnar <attilamolnar@hush.com>2013-04-28 00:32:14 +0200
committerattilamolnar <attilamolnar@hush.com>2013-04-28 00:32:14 +0200
commit8790551dc182cd8804ee7d8ef89ccb31067cc2a4 (patch)
treefa411b244ae8541e49eb126a9d15a7b5a13504db /src/commands
parent021c09faff4be2e37fa86b0fe3e61707ffddab27 (diff)
parent9b96fee72a3720e6d12812243edb4192d0790b34 (diff)
Merge insp20
Diffstat (limited to 'src/commands')
-rw-r--r--src/commands/cmd_invite.cpp16
1 files changed, 8 insertions, 8 deletions
diff --git a/src/commands/cmd_invite.cpp b/src/commands/cmd_invite.cpp
index 6e5aead12..7221521de 100644
--- a/src/commands/cmd_invite.cpp
+++ b/src/commands/cmd_invite.cpp
@@ -72,16 +72,16 @@ CmdResult CommandInvite::Handle (const std::vector<std::string>& parameters, Use
return CMD_FAILURE;
}
- if (c->HasUser(u))
- {
- user->WriteNumeric(ERR_USERONCHANNEL, "%s %s %s :is already on channel",user->nick.c_str(),u->nick.c_str(),c->name.c_str());
- return CMD_FAILURE;
- }
-
if ((IS_LOCAL(user)) && (!c->HasUser(user)))
- {
+ {
user->WriteNumeric(ERR_NOTONCHANNEL, "%s %s :You're not on that channel!",user->nick.c_str(), c->name.c_str());
- return CMD_FAILURE;
+ return CMD_FAILURE;
+ }
+
+ if (c->HasUser(u))
+ {
+ user->WriteNumeric(ERR_USERONCHANNEL, "%s %s %s :is already on channel",user->nick.c_str(),u->nick.c_str(),c->name.c_str());
+ return CMD_FAILURE;
}
FIRST_MOD_RESULT(OnUserPreInvite, MOD_RESULT, (user,u,c,timeout));