diff options
author | Wim <wim@42.be> | 2016-11-20 23:50:12 +0100 |
---|---|---|
committer | Wim <wim@42.be> | 2016-11-20 23:50:12 +0100 |
commit | 2e54b97fc2fb864d19fb572907bb012b2dcc6467 (patch) | |
tree | beaf2b24c68c8d9eff934e579db72bef2e848471 /gateway/samechannel | |
parent | e1641b2c2e6b80402d642e94fb1df797c1816369 (diff) | |
download | matterbridge-msglm-2e54b97fc2fb864d19fb572907bb012b2dcc6467.tar.gz matterbridge-msglm-2e54b97fc2fb864d19fb572907bb012b2dcc6467.tar.bz2 matterbridge-msglm-2e54b97fc2fb864d19fb572907bb012b2dcc6467.zip |
Add support for RemoteNickFormat in general configuration (samechannelgateway)
Diffstat (limited to 'gateway/samechannel')
-rw-r--r-- | gateway/samechannel/samechannel.go | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/gateway/samechannel/samechannel.go b/gateway/samechannel/samechannel.go index a4777a60..5ea58b84 100644 --- a/gateway/samechannel/samechannel.go +++ b/gateway/samechannel/samechannel.go @@ -73,7 +73,10 @@ func (gw *SameChannelGateway) handleMessage(msg config.Message, dest *bridge.Bri func (gw *SameChannelGateway) 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) |