summaryrefslogtreecommitdiffstats
path: root/gateway
diff options
context:
space:
mode:
authorWim <wim@42.be>2017-05-30 00:11:53 +0200
committerWim <wim@42.be>2017-05-30 00:11:53 +0200
commitc791423dd5c56d6fbf5908e7bf8b7343b908337d (patch)
tree18d3d7199b9fe8d8b914671449d79413a66ca712 /gateway
parent80bdf383887410bb0aa26f808606892026681e0c (diff)
downloadmatterbridge-msglm-c791423dd5c56d6fbf5908e7bf8b7343b908337d.tar.gz
matterbridge-msglm-c791423dd5c56d6fbf5908e7bf8b7343b908337d.tar.bz2
matterbridge-msglm-c791423dd5c56d6fbf5908e7bf8b7343b908337d.zip
Add NOPINGNICK option. Closes #175
Diffstat (limited to 'gateway')
-rw-r--r--gateway/gateway.go1
1 files changed, 1 insertions, 0 deletions
diff --git a/gateway/gateway.go b/gateway/gateway.go
index 4cf4e0ec..8ca504e5 100644
--- a/gateway/gateway.go
+++ b/gateway/gateway.go
@@ -234,6 +234,7 @@ func (gw *Gateway) modifyUsername(msg *config.Message, dest *bridge.Bridge) {
if nick == "" {
nick = dest.Config.RemoteNickFormat
}
+ nick = strings.Replace(nick, "{NOPINGNICK}", msg.Username[:1]+"​"+msg.Username[1:], -1)
nick = strings.Replace(nick, "{NICK}", msg.Username, -1)
nick = strings.Replace(nick, "{BRIDGE}", br.Name, -1)
nick = strings.Replace(nick, "{PROTOCOL}", br.Protocol, -1)