Support SASL

This commit is contained in:
hedy 2024-04-04 12:37:10 +00:00
parent 92f69dcdc5
commit 2412ddd076
3 changed files with 21 additions and 23 deletions

View File

@ -1,24 +1,23 @@
from ircrobots import SASLUserPass
NICKNAME = "hedyrelay"
SERVERS = {
"libera": {
# host port
"connection": ("irc.libera.chat", 6697),
"connection": {
"host": "irc.libera.chat", "port": 6697,
"sasl": SASLUserPass("username", "password"),
},
"chans": ["#hedy-dev"],
"hidechan": True,
},
"tilde": {
"connection": ("irc.tilde.chat", 6697),
"connection": {
"host": "irc.tilde.chat", "port": 6697,
"sasl": SASLUserPass("username", "password"),
},
"chans": ["##hedy-dev"],
"hidechan": True,
},
"foxies": {
"connection": (
"va.furryplace.eu",
6697,
),
"chans": ["#hedy-dev"],
"hidechan": True,
},
}

View File

@ -1,24 +1,23 @@
from ircrobots import SASLUserPass
NICKNAME = "hedyrelay"
SERVERS = {
"libera": {
# host port
"connection": ("irc.libera.chat", 6697),
"connection": {
"host": "irc.libera.chat", "port": 6697,
"sasl": SASLUserPass("username", "password"),
},
"chans": ["#hedy"],
"hidechan": True,
},
"tilde": {
"connection": ("irc.tilde.chat", 6697),
"connection": {
"host": "irc.tilde.chat", "port": 6697,
"sasl": SASLUserPass("username", "password"),
},
"chans": ["##hedy"],
"hidechan": True,
},
"foxies": {
"connection": (
"va.furryplace.eu",
6697,
),
"chans": ["#hedy"],
"hidechan": True,
},
}

View File

@ -178,7 +178,7 @@ def find_all_indexes(input_str, search_str):
async def main():
bot = Bot()
for name, s in SERVERS.items():
params = ConnectionParams(NICKNAME, *s["connection"])
params = ConnectionParams(NICKNAME, **s["connection"])
await bot.add_server(name, params)
await bot.run()