From cf9849a1129806aaafcc821637feee6cd29fda78 Mon Sep 17 00:00:00 2001 From: Pelish Date: Wed, 8 Oct 2008 21:51:16 +0000 Subject: [PATCH] fix for bug [ #7724 ] VOP don't have permission to chat while channel is moderated --- pvpgn/src/bnetd/channel.cpp | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/pvpgn/src/bnetd/channel.cpp b/pvpgn/src/bnetd/channel.cpp index 379046e..450c08d 100644 --- a/pvpgn/src/bnetd/channel.cpp +++ b/pvpgn/src/bnetd/channel.cpp @@ -647,6 +647,7 @@ extern void channel_message_send(t_channel const * channel, t_message_type type, // or everyone when channel has no clienttag set t_message * message2; //send to people with clienttag not matching channel clienttag t_message * message_to_send; + t_account * acc; if (!channel) @@ -660,6 +661,8 @@ extern void channel_message_send(t_channel const * channel, t_message_type type, return; } + acc = conn_get_account(me); + if(channel_get_flags(channel) & channel_flags_thevoid) // no talking in the void if (type!=message_type_join && type!=message_type_part) return; @@ -668,8 +671,8 @@ extern void channel_message_send(t_channel const * channel, t_message_type type, { if (type==message_type_talk || type==message_type_emote) { - if (!((account_is_operator_or_admin(conn_get_account(me),channel_get_name(channel))) || - (channel_conn_has_tmpVOICE(channel,me)))) + if (!((account_is_operator_or_admin(acc,channel_get_name(channel))) || + (channel_conn_has_tmpVOICE(channel,me)) || (account_get_auth_voice(acc,channel_get_name(channel)) == 1) )) { message_send_text(me,message_type_error,me,"This channel is moderated"); return;