mirror of
https://github.com/42wim/matterbridge.git
synced 2024-11-28 15:09:26 +01:00
Update settings
parent
0bfc243c81
commit
f883167dcd
35
Settings.md
35
Settings.md
@ -116,7 +116,8 @@
|
|||||||
- [UseFirstName](#usefirstname)
|
- [UseFirstName](#usefirstname)
|
||||||
- [UseInsecureURL](#useinsecureurl)
|
- [UseInsecureURL](#useinsecureurl)
|
||||||
- [Tengo](#tengo)
|
- [Tengo](#tengo)
|
||||||
- [Message](#message)
|
- [InMessage](#inmessage)
|
||||||
|
- [OutMessage](#outmessage)
|
||||||
- [RemoteNickFormat](#remotenickformat-2)
|
- [RemoteNickFormat](#remotenickformat-2)
|
||||||
- [Whatsapp](#whatsapp)
|
- [Whatsapp](#whatsapp)
|
||||||
- [Number *](#number-)
|
- [Number *](#number-)
|
||||||
@ -1136,8 +1137,8 @@ Example: enable it
|
|||||||
# Tengo
|
# Tengo
|
||||||
More information about tengo on: https://github.com/d5/tengo/blob/master/docs/tutorial.md and https://github.com/d5/tengo/blob/master/docs/stdlib.md
|
More information about tengo on: https://github.com/d5/tengo/blob/master/docs/tutorial.md and https://github.com/d5/tengo/blob/master/docs/stdlib.md
|
||||||
|
|
||||||
## Message
|
## InMessage
|
||||||
Message allows you to specify the location of a tengo (https://github.com/d5/tengo/) script.
|
InMessage allows you to specify the location of a tengo (https://github.com/d5/tengo/) script.
|
||||||
This script will receive every incoming message and can be used to modify the Username and the Text of that message.
|
This script will receive every incoming message and can be used to modify the Username and the Text of that message.
|
||||||
The script will have the following global variables: \
|
The script will have the following global variables: \
|
||||||
to modify: `msgUsername` and `msgText` \
|
to modify: `msgUsername` and `msgText` \
|
||||||
@ -1158,10 +1159,34 @@ if text.re_match("blah",msgText) {
|
|||||||
```
|
```
|
||||||
|
|
||||||
Setting: OPTIONAL, RELOADABLE \
|
Setting: OPTIONAL, RELOADABLE \
|
||||||
Format: string \
|
Format: string
|
||||||
Example:
|
Example:
|
||||||
|
|
||||||
`Message="example.tengo"`
|
`InMessage="example.tengo"`
|
||||||
|
|
||||||
|
## OutMessage
|
||||||
|
OutMessage allows you to specify 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`, `inEvent`
|
||||||
|
`outAccount`, `outProtocol`, `outChannel`, `outGateway`, `outEvent`
|
||||||
|
|
||||||
|
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.
|
||||||
|
|
||||||
|
Setting: OPTIONAL, RELOADABLE \
|
||||||
|
Format: string
|
||||||
|
Example:
|
||||||
|
|
||||||
|
`OutMessage="example.tengo"`
|
||||||
|
|
||||||
## RemoteNickFormat
|
## RemoteNickFormat
|
||||||
RemoteNickFormat allows you to specify the location of a tengo (https://github.com/d5/tengo/) script.
|
RemoteNickFormat allows you to specify the location of a tengo (https://github.com/d5/tengo/) script.
|
||||||
|
Loading…
Reference in New Issue
Block a user