From bb27ff617ca1d2590e94ecb0b32542dd8464c766 Mon Sep 17 00:00:00 2001 From: Jan Vidar Krey Date: Sat, 25 Jul 2009 03:33:36 +0200 Subject: [PATCH] Re-fix chat_is_privileged. --- src/hub.c | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/src/hub.c b/src/hub.c index a0521cc..3fedf87 100644 --- a/src/hub.c +++ b/src/hub.c @@ -188,12 +188,16 @@ int hub_handle_chat_message(struct hub_info* hub, struct user* u, struct adc_mes int ret = 0; int relay = 1; - /* TODO: Check for hub-commands here. Set relay to 0 and the message will not be sent to other users. */ if (message[0] == '!' || message[0] == '+') { relay = command_dipatcher(hub, u, message); } + if (hub->config->chat_is_privileged && !user_is_protected(u) && (cmd->cache[0] == 'B' || cmd->cache[0] == 'F')) + { + relay = 0; + } + if (relay && user_is_logged_in(u)) { /* adc_msg_remove_named_argument(cmd, "PM"); */