diff options
author | Wim <wim@42.be> | 2017-05-30 00:11:53 +0200 |
---|---|---|
committer | Wim <wim@42.be> | 2017-05-30 00:11:53 +0200 |
commit | c791423dd5c56d6fbf5908e7bf8b7343b908337d (patch) | |
tree | 18d3d7199b9fe8d8b914671449d79413a66ca712 | |
parent | 80bdf383887410bb0aa26f808606892026681e0c (diff) | |
download | matterbridge-msglm-c791423dd5c56d6fbf5908e7bf8b7343b908337d.tar.gz matterbridge-msglm-c791423dd5c56d6fbf5908e7bf8b7343b908337d.tar.bz2 matterbridge-msglm-c791423dd5c56d6fbf5908e7bf8b7343b908337d.zip |
Add NOPINGNICK option. Closes #175
-rw-r--r-- | gateway/gateway.go | 1 | ||||
-rw-r--r-- | matterbridge.toml.sample | 1 |
2 files changed, 2 insertions, 0 deletions
diff --git a/gateway/gateway.go b/gateway/gateway.go index 4cf4e0ec..8ca504e5 100644 --- a/gateway/gateway.go +++ b/gateway/gateway.go @@ -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) diff --git a/matterbridge.toml.sample b/matterbridge.toml.sample index 4e1a3f70..d3e38344 100644 --- a/matterbridge.toml.sample +++ b/matterbridge.toml.sample @@ -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}> " |