aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorDenis 'GNUtoo' Carikli <GNUtoo@cyberdimension.org>2021-06-07 17:50:31 +0200
committerDenis 'GNUtoo' Carikli <GNUtoo@cyberdimension.org>2021-06-07 22:32:51 +0200
commit73c67faa1278d2a0244d2af7d813c94588d33292 (patch)
treee4ef49f5ca72c486c00d3fc1e50f72fda2e82413
parent6bc0187704b46e18848647c1ba22d66ad0218a9a (diff)
downloadmatterbridge-73c67faa1278d2a0244d2af7d813c94588d33292.tar.gz
matterbridge-73c67faa1278d2a0244d2af7d813c94588d33292.tar.bz2
matterbridge-73c67faa1278d2a0244d2af7d813c94588d33292.zip
Add hackint configuration but disable it by default
According to the Replicant wiki[1], we also have a #replicant channel on the hackint IRC network, so we need to bridge that channel as well. While the configuration works, we cannot enable it by default because there is already another bot from Jeremy Rand that already bridges hackint, and OFTC (but not libera.chat). If we enabled hackint, we would end up having an infinite replaying of messages between the two bots, which would probably get both bots kicked. [1]https://redmine.replicant.us/projects/replicant/wiki/CommunityAndContact#IRC Signed-off-by: Denis 'GNUtoo' Carikli <GNUtoo@cyberdimension.org>
-rwxr-xr-xgenerate-matterbridge-config.py5
-rw-r--r--matterbridge.toml.example15
2 files changed, 19 insertions, 1 deletions
diff --git a/generate-matterbridge-config.py b/generate-matterbridge-config.py
index 3e62808..47f181b 100755
--- a/generate-matterbridge-config.py
+++ b/generate-matterbridge-config.py
@@ -31,17 +31,22 @@ password_files_paths = [
for password_file_path in password_files_paths:
password_file = netrc.netrc(password_file_path)
+ hackint_entry = password_file.authenticators('irc.hackint')
liberachat_entry = password_file.authenticators('irc.liberachat')
oftc_entry = password_file.authenticators('irc.OFTC')
+ if hackint_entry == None:
+ continue
if liberachat_entry == None:
continue
if oftc_entry == None:
continue
+ hackint_password = hackint_entry[2]
liberachat_password = liberachat_entry[2]
oftc_password = oftc_entry[2]
for line in example:
+ line = line.replace('HACKINT-PASSWORD', hackint_password)
line = line.replace('LIBERACHAT-PASSWORD', liberachat_password)
line = line.replace('OFTC-PASSWORD', oftc_password)
generated.write(line)
diff --git a/matterbridge.toml.example b/matterbridge.toml.example
index 2ab620f..b3b2ec6 100644
--- a/matterbridge.toml.example
+++ b/matterbridge.toml.example
@@ -1,4 +1,14 @@
[irc]
+ [irc.hackint]
+ Nick="Replicant-bridge"
+ NickServNick="Replicant-bridge"
+ NickServPassword="HACKINT-PASSWORD"
+ Server="irc.hackint.org:6697"
+ UseTLS=true
+ UseSASL=true
+ SkipTLSVerify=false
+ Label="hackint"
+ RemoteNickFormat="<{NICK} ({LABEL})> "
[irc.liberachat]
Nick="Replicant-bridge"
@@ -24,6 +34,10 @@
[[gateway]]
name="mygateway"
enable=true
+ # [[gateway.inout]]
+ # account="irc.hackint"
+ # channel="#replicant"
+
[[gateway.inout]]
account="irc.liberachat"
channel="#replicant"
@@ -31,4 +45,3 @@ enable=true
[[gateway.inout]]
account="irc.OFTC"
channel="#replicant"
-