Re-fix chat_is_privileged.

This commit is contained in:
Jan Vidar Krey 2009-07-25 03:33:36 +02:00
parent dc90245ade
commit bb27ff617c

View File

@ -188,12 +188,16 @@ int hub_handle_chat_message(struct hub_info* hub, struct user* u, struct adc_mes
int ret = 0; int ret = 0;
int relay = 1; 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] == '+') if (message[0] == '!' || message[0] == '+')
{ {
relay = command_dipatcher(hub, u, message); 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)) if (relay && user_is_logged_in(u))
{ {
/* adc_msg_remove_named_argument(cmd, "PM"); */ /* adc_msg_remove_named_argument(cmd, "PM"); */