chat_formatting: type: world debug: true enabled: true events: on player chats flagged:!player.chat.busy: ################## highlight player names, server locations and links - define textrpl - define symbols - define linkstart - define linkend - definemap words: discord: https://is.gd/cdiscord].custom_color[discord]> Orbis: Moraira: Ituria: Projektwelt: Regeln: # loop through each word of message - foreach as:word: # test if the word is a link (definition used for now with typical subdomains or domain endings) - if <[linkstart].filter_tag[<[word].starts_with[<[filter_value]>]>].any> || <[linkend].filter_tag[<[word].ends_with[<[filter_value]>]>].any>: # replace word with word + custom_color ... currently also highlights symbols like !,.,? at the end of the word, needs a fix - define textrpl <[textrpl].replace[<[word]>].with[].custom_color[link]>]> - foreach next # loop through every key in map "words" - foreach <[words].keys> as:replaceable: # if substring (length) of the currently indexed word matches with currently indexed key from words map - if <[word].substring[0,<[replaceable].length>]> == <[replaceable]>: - define textrpl <[textrpl].replace[<[word].substring[0,<[replaceable].length>]>].with[<[words.<[replaceable]>]>]> - foreach stop - define text "<&f><&co> <[textrpl]>"