X-Git-Url: https://git.netwichtig.de/gitweb/?a=blobdiff_plain;f=src%2Fcommands%2Fcmd_invite.cpp;h=c69e6bd1be19fa2f99bf00d53401edb699fc92a6;hb=ad8625919378ffbdbf0993d56e16a75a47c4715e;hp=fd595d6183047167f6540c5679d71f37e781d6fc;hpb=a0f92dd232097fa6662265ca49b222b72ca39c83;p=user%2Fhenk%2Fcode%2Finspircd.git diff --git a/src/commands/cmd_invite.cpp b/src/commands/cmd_invite.cpp index fd595d618..c69e6bd1b 100644 --- a/src/commands/cmd_invite.cpp +++ b/src/commands/cmd_invite.cpp @@ -72,16 +72,16 @@ CmdResult CommandInvite::Handle (const std::vector& 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));