diff options
author | Qais Patankar <qaisjp@gmail.com> | 2019-04-14 22:42:16 +0100 |
---|---|---|
committer | Wim <wim@42.be> | 2019-04-14 23:42:16 +0200 |
commit | 220485a849ad1c03ee8ce74f9af45b9d6088f9cf (patch) | |
tree | 4c2c43ca8c0c3c563662ff5b3591c9dda1e5b156 /contrib | |
parent | 4db34b0506cc7998437313efaf33ee9b3d15aa3b (diff) | |
download | matterbridge-msglm-220485a849ad1c03ee8ce74f9af45b9d6088f9cf.tar.gz matterbridge-msglm-220485a849ad1c03ee8ce74f9af45b9d6088f9cf.tar.bz2 matterbridge-msglm-220485a849ad1c03ee8ce74f9af45b9d6088f9cf.zip |
Add remotenickformat-zerowidth.tengo to contrib (#799)
Diffstat (limited to 'contrib')
-rw-r--r-- | contrib/remotenickformat-zerowidth.tengo | 16 |
1 files changed, 16 insertions, 0 deletions
diff --git a/contrib/remotenickformat-zerowidth.tengo b/contrib/remotenickformat-zerowidth.tengo new file mode 100644 index 00000000..8d1d0656 --- /dev/null +++ b/contrib/remotenickformat-zerowidth.tengo @@ -0,0 +1,16 @@ +/* +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:] +} |