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