5
0
mirror of https://github.com/cwinfo/matterbridge.git synced 2024-11-22 10:30:26 +00:00

Change RemoteNickFormat replacement order. Closes #336

This commit is contained in:
Wim 2018-01-14 16:55:32 +01:00
parent d0b2ee5c85
commit 7631d43c48

View File

@ -284,9 +284,9 @@ func (gw *Gateway) modifyUsername(msg config.Message, dest *bridge.Bridge) strin
} }
nick = strings.Replace(nick, "{NOPINGNICK}", msg.Username[:i]+""+msg.Username[i:], -1) nick = strings.Replace(nick, "{NOPINGNICK}", msg.Username[:i]+""+msg.Username[i:], -1)
} }
nick = strings.Replace(nick, "{NICK}", msg.Username, -1)
nick = strings.Replace(nick, "{BRIDGE}", br.Name, -1) nick = strings.Replace(nick, "{BRIDGE}", br.Name, -1)
nick = strings.Replace(nick, "{PROTOCOL}", br.Protocol, -1) nick = strings.Replace(nick, "{PROTOCOL}", br.Protocol, -1)
nick = strings.Replace(nick, "{NICK}", msg.Username, -1)
return nick return nick
} }