Add NOPINGNICK option. Closes #175

This commit is contained in:
Wim 2017-05-30 00:11:53 +02:00
parent 80bdf38388
commit c791423dd5
2 changed files with 2 additions and 0 deletions

View File

@ -234,6 +234,7 @@ func (gw *Gateway) modifyUsername(msg *config.Message, dest *bridge.Bridge) {
if nick == "" {
nick = dest.Config.RemoteNickFormat
}
nick = strings.Replace(nick, "{NOPINGNICK}", msg.Username[:1]+""+msg.Username[1:], -1)
nick = strings.Replace(nick, "{NICK}", msg.Username, -1)
nick = strings.Replace(nick, "{BRIDGE}", br.Name, -1)
nick = strings.Replace(nick, "{PROTOCOL}", br.Protocol, -1)

View File

@ -66,6 +66,7 @@ IgnoreNicks="ircspammer1 ircspammer2"
#The string "{NICK}" (case sensitive) will be replaced by the actual nick / username.
#The string "{BRIDGE}" (case sensitive) will be replaced by the sending bridge
#The string "{PROTOCOL}" (case sensitive) will be replaced by the protocol used by the bridge
#The string "{NOPINGNICK}" (case sensitive) will be replaced by the actual nick / username, but with a ZWSP inside the nick, so the irc user with the same nick won't get pinged. See https://github.com/42wim/matterbridge/issues/175 for more information
#OPTIONAL (default empty)
RemoteNickFormat="[{PROTOCOL}] <{NICK}> "