commit b1bffec21af2b10df64cf61509edf11a3b54741a
Author: Patrick Connolly <patrick.c.connolly@gmail.com>
Date: Wed Oct 24 03:53:11 2018 +0000
diff --git a/gateway/gateway.go b/gateway/gateway.go
index a33a9a9..5bfb00e 100644
--- a/gateway/gateway.go
+++ b/gateway/gateway.go
@@ -3776 +3777 @@ func (gw *Gateway) modifyUsername(msg config.Message, dest *bridge.Bridge) strin
nick = strings.Replace(nick, "{GATEWAY}", gw.Name, -1)
nick = strings.Replace(nick, "{LABEL}", br.GetString("Label"), -1)
nick = strings.Replace(nick, "{NICK}", msg.Username, -1)
+ nick = strings.Replace(nick, "{CHANNEL}", msg.Channel, -1)
return nick
}
diff --git a/matterbridge.toml.sample b/matterbridge.toml.sample
index 790eaad..0ec5596 100644
--- a/matterbridge.toml.sample
+++ b/matterbridge.toml.sample
@@ -12912 +1298 @@ ReplaceNicks=[ ["user--","user"] ]
Label=""
#RemoteNickFormat defines how remote users appear on this bridge
-#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 "{LABEL}" (case sensitive) will be replaced by label= field of the sending bridge
-#The string "{PROTOCOL}" (case sensitive) will be replaced by the protocol used by the bridge
+#See [general] config section for default options
#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}> "
#Enable to show users joins/parts from other bridges
@@ -22711 +2237 @@ ReplaceNicks=[ ["user--","user"] ]
Label=""
#RemoteNickFormat defines how remote users appear on this bridge
-#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 "{LABEL}" (case sensitive) will be replaced by label= field of the sending bridge
-#The string "{PROTOCOL}" (case sensitive) will be replaced by the protocol used by the bridge
-#OPTIONAL (default empty)
+#See [general] config section for default options
RemoteNickFormat="[{PROTOCOL}] <{NICK}> "
#Enable to show users joins/parts from other bridges
@@ -31111 +3037 @@ ReplaceNicks=[ ["user--","user"] ]
Label=""
#RemoteNickFormat defines how remote users appear on this bridge
-#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 "{LABEL}" (case sensitive) will be replaced by label= field of the sending bridge
-#The string "{PROTOCOL}" (case sensitive) will be replaced by the protocol used by the bridge
-#OPTIONAL (default empty)
+#See [general] config section for default options
RemoteNickFormat="[{PROTOCOL}/{BRIDGE}] <{NICK}> "
#Enable to show users joins/parts from other bridges
@@ -45511 +4437 @@ ReplaceNicks=[ ["user--","user"] ]
Label=""
#RemoteNickFormat defines how remote users appear on this bridge
-#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 "{LABEL}" (case sensitive) will be replaced by label= field of the sending bridge
-#The string "{PROTOCOL}" (case sensitive) will be replaced by the protocol used by the bridge
-#OPTIONAL (default empty)
+#See [general] config section for default options
RemoteNickFormat="[{PROTOCOL}] <{NICK}> "
#Enable to show users joins/parts from other bridges
@@ -53411 +5187 @@ ReplaceNicks=[ ["user--","user"] ]
Label=""
#RemoteNickFormat defines how remote users appear on this bridge
-#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 "{LABEL}" (case sensitive) will be replaced by label= field of the sending bridge
-#The string "{PROTOCOL}" (case sensitive) will be replaced by the protocol used by the bridge
-#OPTIONAL (default empty)
+#See [general] config section for default options
RemoteNickFormat="[{PROTOCOL}] <{NICK}> "
#Enable to show users joins/parts from other bridges
@@ -65611 +6367 @@ ReplaceNicks=[ ["user--","user"] ]
Label=""
#RemoteNickFormat defines how remote users appear on this bridge
-#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 "{LABEL}" (case sensitive) will be replaced by label= field of the sending bridge
-#The string "{PROTOCOL}" (case sensitive) will be replaced by the protocol used by the bridge
-#OPTIONAL (default empty)
+#See [general] config section for default options
RemoteNickFormat="[{PROTOCOL}] <{NICK}> "
#Enable to show users joins/parts from other bridges
@@ -75911 +7357 @@ ReplaceNicks=[ ["user--","user"] ]
Label=""
#RemoteNickFormat defines how remote users appear on this bridge
-#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 "{LABEL}" (case sensitive) will be replaced by label= field of the sending bridge
-#The string "{PROTOCOL}" (case sensitive) will be replaced by the protocol used by the bridge
-#OPTIONAL (default empty)
+#See [general] config section for default options
RemoteNickFormat="[{PROTOCOL}] <{NICK}> "
#Enable to show users joins/parts from other bridges
@@ -86616 +83811 @@ ReplaceNicks=[ ["user--","user"] ]
Label=""
#RemoteNickFormat defines how remote users appear on this bridge
-#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 "{LABEL}" (case sensitive) will be replaced by label= field of the sending bridge
-#The string "{PROTOCOL}" (case sensitive) will be replaced by the protocol used by the bridge
+#See [general] config section for default options
#
#WARNING: if you have set MessageFormat="HTML" be sure that this format matches the guidelines
#on https://core.telegram.org/bots/api#html-style otherwise the message will not go through to
#telegram! eg <{NICK}> should be <{NICK}>
-#
-#OPTIONAL (default empty)
RemoteNickFormat="[{PROTOCOL}] <{NICK}> "
#Enable to show users joins/parts from other bridges
@@ -96911 +9367 @@ ReplaceNicks=[ ["user--","user"] ]
Label=""
#RemoteNickFormat defines how remote users appear on this bridge
-#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 "{LABEL}" (case sensitive) will be replaced by label= field of the sending bridge
-#The string "{PROTOCOL}" (case sensitive) will be replaced by the protocol used by the bridge
-#OPTIONAL (default empty)
+#See [general] config section for default options
RemoteNickFormat="[{PROTOCOL}] <{NICK}> "
#Enable to show users joins/parts from other bridges
@@ -105911 +10227 @@ ReplaceNicks=[ ["user--","user"] ]
Label=""
#RemoteNickFormat defines how remote users appear on this bridge
-#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 "{LABEL}" (case sensitive) will be replaced by label= field of the sending bridge
-#The string "{PROTOCOL}" (case sensitive) will be replaced by the protocol used by the bridge
-#OPTIONAL (default empty)
+#See [general] config section for default options
RemoteNickFormat="[{PROTOCOL}] <{NICK}> "
#Enable to show users joins/parts from other bridges
@@ -114311 +11027 @@ ReplaceNicks=[ ["user--","user"] ]
Label=""
#RemoteNickFormat defines how remote users appear on this bridge
-#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 "{LABEL}" (case sensitive) will be replaced by label= field of the sending bridge
-#The string "{PROTOCOL}" (case sensitive) will be replaced by the protocol used by the bridge
-#OPTIONAL (default empty)
+#See [general] config section for default options
RemoteNickFormat="[{PROTOCOL}] <{NICK}> "
#Enable to show users joins/parts from other bridges
@@ -122711 +11827 @@ ReplaceNicks=[ ["user--","user"] ]
Label=""
#RemoteNickFormat defines how remote users appear on this bridge
-#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 "{LABEL}" (case sensitive) will be replaced by label= field of the sending bridge
-#The string "{PROTOCOL}" (case sensitive) will be replaced by the protocol used by the bridge
-#OPTIONAL (default empty)
+#See [general] config section for default options
RemoteNickFormat="[{PROTOCOL}] <{NICK}> "
#Enable to show users joins/parts from other bridges
@@ -127511 +12267 @@ Token="mytoken"
Label=""
#RemoteNickFormat defines how remote users appear on this bridge
-#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 "{LABEL}" (case sensitive) will be replaced by label= field of the sending bridge
-#The string "{PROTOCOL}" (case sensitive) will be replaced by the protocol used by the bridge
-#OPTIONAL (default empty)
+#See [general] config section for default options
RemoteNickFormat="{NICK}"
@@ -12986 +12458 @@ RemoteNickFormat="{NICK}"
#The string "{BRIDGE}" (case sensitive) will be replaced by the sending bridge
#The string "{LABEL}" (case sensitive) will be replaced by label= field of the sending bridge
#The string "{PROTOCOL}" (case sensitive) will be replaced by the protocol used by the bridge
+#The string "{GATEWAY}" (case sensitive) will be replaced by the origin gateway name that is replicating the message.
+#The string "{CHANNEL}" (case sensitive) will be replaced by the origin channel name used by the bridge
#OPTIONAL (default empty)
RemoteNickFormat="[{PROTOCOL}] <{NICK}> "