diff options
author | Wim <wim@42.be> | 2016-11-20 23:33:41 +0100 |
---|---|---|
committer | Wim <wim@42.be> | 2016-11-20 23:33:41 +0100 |
commit | e1641b2c2e6b80402d642e94fb1df797c1816369 (patch) | |
tree | dbdf21c54607c36b786f608fbb8b13ef34116cb2 /gateway | |
parent | e0e1e4be8018b256d86e2df9c3f84fc7881041c3 (diff) | |
download | matterbridge-msglm-e1641b2c2e6b80402d642e94fb1df797c1816369.tar.gz matterbridge-msglm-e1641b2c2e6b80402d642e94fb1df797c1816369.tar.bz2 matterbridge-msglm-e1641b2c2e6b80402d642e94fb1df797c1816369.zip |
Add support for RemoteNickFormat in general configuration
Diffstat (limited to 'gateway')
-rw-r--r-- | gateway/gateway.go | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/gateway/gateway.go b/gateway/gateway.go index f45f315e..e36d1a4d 100644 --- a/gateway/gateway.go +++ b/gateway/gateway.go @@ -178,7 +178,10 @@ func (gw *Gateway) modifyMessage(msg *config.Message, dest *bridge.Bridge) { func (gw *Gateway) modifyUsername(msg *config.Message, dest *bridge.Bridge) { br := gw.Bridges[msg.Account] - nick := dest.Config.RemoteNickFormat + nick := gw.Config.General.RemoteNickFormat + if nick == "" { + nick = dest.Config.RemoteNickFormat + } nick = strings.Replace(nick, "{NICK}", msg.Username, -1) nick = strings.Replace(nick, "{BRIDGE}", br.Name, -1) nick = strings.Replace(nick, "{PROTOCOL}", br.Protocol, -1) |