No need to allow users not yet logged in to send special hub commands to the hub.

Nothing bad will happen, except the hub will try to answer them even though the user is not yet fully logged in. This fix ensures that these messages are simply dropped instead.
This commit is contained in:
Jan Vidar Krey 2009-12-09 19:40:12 +01:00
parent 50f5ce9d32
commit 1f9cfe58c4

View File

@ -184,7 +184,7 @@ int hub_handle_chat_message(struct hub_info* hub, struct hub_user* u, struct adc
int ret = 0;
int relay = 1;
if (!message)
if (!message || !user_is_logged_in(u))
return 0;
if ((cmd->cache[0] == 'B') && (message[0] == '!' || message[0] == '+'))
@ -211,7 +211,7 @@ int hub_handle_chat_message(struct hub_info* hub, struct hub_user* u, struct adc
relay = 0;
}
if (relay && user_is_logged_in(u))
if (relay)
{
/* adc_msg_remove_named_argument(cmd, "PM"); */
if (cmd->cache[0] == 'B')