From 2e54b97fc2fb864d19fb572907bb012b2dcc6467 Mon Sep 17 00:00:00 2001 From: Wim Date: Sun, 20 Nov 2016 23:50:12 +0100 Subject: Add support for RemoteNickFormat in general configuration (samechannelgateway) --- gateway/samechannel/samechannel.go | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) 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) -- cgit v1.2.3