diff options
-rw-r--r-- | src/commands/cmd_invite.cpp | 2 | ||||
-rw-r--r-- | src/commands/cmd_notice.cpp | 2 | ||||
-rw-r--r-- | src/commands/cmd_privmsg.cpp | 2 | ||||
-rw-r--r-- | src/users.cpp | 3 |
4 files changed, 5 insertions, 4 deletions
diff --git a/src/commands/cmd_invite.cpp b/src/commands/cmd_invite.cpp index 200cce4a3..8025296ae 100644 --- a/src/commands/cmd_invite.cpp +++ b/src/commands/cmd_invite.cpp @@ -66,7 +66,7 @@ CmdResult CommandInvite::Handle (const std::vector<std::string>& parameters, Use timeout = ConvToInt(parameters[2]); } - if ((!c) || (!u)) + if ((!c) || (!u) || (u->registered != REG_ALL)) { user->WriteNumeric(ERR_NOSUCHNICK, "%s %s :No such nick/channel",user->nick.c_str(), c ? parameters[0].c_str() : parameters[1].c_str()); return CMD_FAILURE; diff --git a/src/commands/cmd_notice.cpp b/src/commands/cmd_notice.cpp index b060a534f..d5ef7ba1d 100644 --- a/src/commands/cmd_notice.cpp +++ b/src/commands/cmd_notice.cpp @@ -189,7 +189,7 @@ CmdResult CommandNotice::Handle (const std::vector<std::string>& parameters, Use else dest = ServerInstance->FindNick(destnick); - if (dest) + if ((dest) && (dest->registered == REG_ALL)) { if (parameters[1].empty()) { diff --git a/src/commands/cmd_privmsg.cpp b/src/commands/cmd_privmsg.cpp index 5eac99dd5..cefdd4800 100644 --- a/src/commands/cmd_privmsg.cpp +++ b/src/commands/cmd_privmsg.cpp @@ -192,7 +192,7 @@ CmdResult CommandPrivmsg::Handle (const std::vector<std::string>& parameters, Us else dest = ServerInstance->FindNick(destnick); - if (dest) + if ((dest) && (dest->registered == REG_ALL)) { if (parameters[1].empty()) { diff --git a/src/users.cpp b/src/users.cpp index eeb80ccc9..cce5c4514 100644 --- a/src/users.cpp +++ b/src/users.cpp @@ -1520,7 +1520,8 @@ void User::SendAll(const char* command, const char* text, ...) for (std::vector<LocalUser*>::const_iterator i = ServerInstance->Users->local_users.begin(); i != ServerInstance->Users->local_users.end(); i++) { - (*i)->Write(fmt); + if ((*i)->registered == REG_ALL) + (*i)->Write(fmt); } } |