From 1f9cfe58c4bd470fe477373189e09e11c71a11d4 Mon Sep 17 00:00:00 2001 From: Jan Vidar Krey Date: Wed, 9 Dec 2009 19:40:12 +0100 Subject: [PATCH] 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. --- src/core/hub.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/core/hub.c b/src/core/hub.c index 1946383..03d6c43 100644 --- a/src/core/hub.c +++ b/src/core/hub.c @@ -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')