mirror of
https://github.com/cwinfo/matterbridge.git
synced 2025-07-04 13:37:44 +00:00
some examples: this replaces a message like "Relaybot: <relayeduser> something interesting" to "relayeduser: something interesting" ExtractNicks=[ [ "Relaybot", "<(.*?)>\\s+" ] ] you can use multiple entries for multiplebots this also replaces a message like "otherbot: (relayeduser) something else" to "relayeduser: something else" ExtractNicks=[ [ "Relaybot", "<(.*?)>\\s+" ],[ "otherbot","\\((.*?)\\)\\s+" ] OPTIONAL (default empty) ExtractNicks=[ ["otherbot","<(.*?)>\\s+" ] ]
This commit is contained in:
@ -351,6 +351,8 @@ func (gw *Gateway) modifyMessage(msg *config.Message) {
|
||||
msg.Text = re.ReplaceAllString(msg.Text, replace)
|
||||
}
|
||||
|
||||
gw.handleExtractNicks(msg)
|
||||
|
||||
// messages from api have Gateway specified, don't overwrite
|
||||
if msg.Protocol != apiProtocol {
|
||||
msg.Gateway = gw.Name
|
||||
|
Reference in New Issue
Block a user