kangarko / ChatControl-Red

Issue tracker and documentation for the next generation ChatControl Red, the most advanced chat management plugin.
49 stars 23 forks source link

1.20.4: Discord vs. In Game prefix tag #2620

Closed ScrapMetalGolem closed 6 months ago

ScrapMetalGolem commented 6 months ago

Are you using MySQL?

Yes

Are you using BungeeCord/Velocity?

No

Question

Intent/Expectation: to use /tag prefix as a second chat prefix for permitted players (in addition to the luckperms/vault prefix already in use). Examples: Player A has prefix of [Owner] from luckperms, and adds prefix of [Manager] from chc tag. Chat message appears as [Owner][Manager]username message. Player B has prefix of [Admin] from luckperms, and adds no other prefix, so messages in chat appear as [Admin]username message.

Behavior: This works exactly as expected within the Minecraft chat, but behaves strangely when discordsrv is involved. The discord message appears in MC chat with the prefix tag placeholder, even though I don't have that placeholder set in the discord prefix section.

chc

Config:

Parts:
  delete-chat:
    Message: '&8[&4X&8] &f'
    Hover: '&cRemove this message from chat for all players.'
    Run_Command: /{label} internal remove {message_uuid}
    Receiver_Permission: chatcontrol.removemessages
  read-prefix:
    Message: '&8[&bRead&8] '
    Receiver_Condition: '''{player_channel_mode_{channel}}'' == ''read'''
  discord-prefix:
    Message: '&8[&9Discord&8] &f{player_nick}'
    Sender_Condition: '{sender_is_discord}'
    Hover: '&bJoin our Discord at timecraftgaming.com'
    Open_Url: https://discord.gg/s3cfmMWtnu
  spies-prefix:
    Message: '&8[&5Spy&8] &f'
    Receiver_Condition: '{player_is_spying_{channel}}'
    Hover: '&dClick to stop spying {channel} channel.'
    Run_Command: /{label_spy} toggle chat {channel}
  prefix:
    Message: '&7[&aG&7] {player_prefix+}{chatcontrolred_prefix_tag+}'
    Hover:
    - '&7{player_prefix+}{player_name} {player_suffix}'
    - '&7Ping&8: &f{ping}ms'
    - '&7Rank&8: &f{player_group}'
    - '&7Posted: &f{timestamp}'
kangarko commented 6 months ago

You can just place the "Sender_Condition" inverted to hide that format part for messages coming from Discord. Example:

Sender_Condition: '!{sender_is_discord}'

Note the ! to invert the logic. Hope that helps! Let me know if you got any other questions :)