5
0
mirror of https://github.com/cwinfo/matterbridge.git synced 2024-11-25 20:11:36 +00:00
matterbridge/bridge/irc
Wim 2d277a15f5
Add scripting (tengo) support for every outgoing message (#806)
Adds a new key OutMessage under [tengo] table, which specifies the location of the script that
will be invoked on each message being sent to a bridge and can be used to modify the Username
and the Text of that message.

The script will have the following global variables:
read-only:
inAccount, inProtocol, inChannel, inGateway
outAccount, outProtocol, outChannel, outGateway

read-write:
msgText, msgUsername

The script is reloaded on every message, so you can modify the script on the fly.

The default script in https://github.com/42wim/matterbridge/tree/master/internal/tengo/outmessage.tengo
is compiled in and will be executed if no script is specified.
2019-04-19 18:27:31 +02:00
..
handlers.go Add scripting (tengo) support for every outgoing message (#806) 2019-04-19 18:27:31 +02:00
irc.go Return when not connected and drop a message (irc). Fixes #786 2019-04-06 22:34:41 +02:00