aboutsummaryrefslogtreecommitdiffstats
path: root/generate-matterbridge-config.py
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 /generate-matterbridge-config.py
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>
Diffstat (limited to 'generate-matterbridge-config.py')
-rwxr-xr-xgenerate-matterbridge-config.py5
1 files changed, 5 insertions, 0 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)