Thumbnail

rani/matterbridge.git

Clone URL: https://git.buni.party/rani/matterbridge.git

commit 00d2e82b2f08a1ffe0ed1ab716f15d7297db88a5 Author: Wim <wim@42.be> Date: Tue May 30 00:11:53 2017 +0000 Add NOPINGNICK option. Closes #175 diff --git a/gateway/gateway.go b/gateway/gateway.go index 4cf4e0e..8ca504e 100644 --- a/gateway/gateway.go +++ b/gateway/gateway.go @@ -2346 +2347 @@ 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) diff --git a/matterbridge.toml.sample b/matterbridge.toml.sample index 4e1a3f7..d3e3834 100644 --- a/matterbridge.toml.sample +++ b/matterbridge.toml.sample @@ -666 +667 @@ 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}> "