fix for bug [ #7724 ] VOP don't have permission to chat while channel is moderated
This commit is contained in:
parent
262b6d4da8
commit
cf9849a112
1 changed files with 5 additions and 2 deletions
|
@ -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;
|
||||
|
|
Loading…
Reference in a new issue