mirror of
https://github.com/cwinfo/matterbridge.git
synced 2024-12-24 03:25:40 +00:00
Add support for RemoteNickFormat in general configuration (samechannelgateway)
This commit is contained in:
parent
e1641b2c2e
commit
2e54b97fc2
@ -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)
|
||||
|
Loading…
Reference in New Issue
Block a user