mirror of
https://github.com/42wim/matterbridge.git
synced 2024-12-22 11:12:44 +01:00
Create mumble-autolink.tengo (#2029)
This commit is contained in:
parent
60639b6e50
commit
3e20a3d180
6
contrib/mumble-autolink.tengo
Normal file
6
contrib/mumble-autolink.tengo
Normal file
@ -0,0 +1,6 @@
|
||||
text := import("text")
|
||||
|
||||
if outProtocol == "mumble" {
|
||||
urlRE := text.re_compile(`(?is)((http|https):\/\/)?([a-z0-9-]+\.)?[a-z0-9-]+(\.[a-z]{2,6}){1,3}(\/[a-z0-9.,_\/~#&=;%+?-]*)?`)
|
||||
msgText = urlRE.replace(msgText,`<a href="$0">$0</a>`)
|
||||
}
|
Loading…
Reference in New Issue
Block a user