Thumbnail

rani/matterbridge.git

Clone URL: https://git.buni.party/rani/matterbridge.git

commit 426a52c075b73d1f8a03b777920916a5a9bf50fb Author: Qais Patankar <qaisjp@gmail.com> Date: Sun Apr 14 22:42:16 2019 +0000 Add remotenickformat-zerowidth.tengo to contrib (#799) diff --git a/contrib/remotenickformat-zerowidth.tengo b/contrib/remotenickformat-zerowidth.tengo new file mode 100644 index 0000000..8d1d065 --- /dev/null +++ b/contrib/remotenickformat-zerowidth.tengo @@ -00 +116 @@ +/* +This script will return the nick except with multi-character usernames +containing a zero-width space between the first and second character letter. + +Single character usernames will be left untouched. + +This is useful to prevent remote users from nickalerting +IRC users of the same name when the remote user speaks. + +This result can be used in {TENGO} in RemoteNickFormat. +*/ + +result = nick +if len(nick) > 1 { + result = string(nick[0]) + "​" + nick[1:] +}