4
0
mirror of https://github.com/cwinfo/matterbridge.git synced 2025-06-26 07:29:24 +00:00

Allow origin CHANNEL to be used in RemoteNickFormat (#515)

* Added origin CHANNEL to RemoteNickFormat. Updated config docs. [Fixes #515]

* Update matterbridge.toml.sample

Co-Authored-By: patcon <patrick.c.connolly@gmail.com>
This commit is contained in:
Patrick Connolly
2018-10-24 03:53:11 +08:00
committed by Wim
parent f2cdda7278
commit 291594b99c
2 changed files with 16 additions and 66 deletions

View File

@ -377,6 +377,7 @@ func (gw *Gateway) modifyUsername(msg config.Message, dest *bridge.Bridge) strin
nick = strings.Replace(nick, "{GATEWAY}", gw.Name, -1)
nick = strings.Replace(nick, "{LABEL}", br.GetString("Label"), -1)
nick = strings.Replace(nick, "{NICK}", msg.Username, -1)
nick = strings.Replace(nick, "{CHANNEL}", msg.Channel, -1)
return nick
}