rj1
about | log | files | refs | license
commit 74d2f68ecb78eb1be74b76275cd491d1bf4611f2
parent 7502154f30497be11fb75262a922a4ab4a747687
author: rj1 <[email protected]>
date:   Mon,  6 Mar 2023 09:31:59 -0600

connect to password protected irc servers

Diffstat:
MREADME.md | 1+
Mchatgpt-irc.py | 3+++
Mexample-config.json | 1+
3 files changed, 5 insertions(+), 0 deletions(-)

diff --git a/README.md b/README.md @@ -29,6 +29,7 @@ https://user-images.githubusercontent.com/83531587/216813675-52ae3cca-efd0-41e5- "nickname": "chatgpt", "ident": "chatgpt", "realname": "chatgpt", + "password": "", "channels": ["#rj1"], "auth_token": "", "cookie": "", diff --git a/chatgpt-irc.py b/chatgpt-irc.py @@ -169,6 +169,9 @@ async def main_loop(**options): sendline = functools.partial(send_line_to_writer, writer) sendcmd = functools.partial(send_cmd_to_writer, writer) + if options.get("password"): + sendcmd("PASS", options["password"]) + sendline("NICK {nickname}".format(**options)) sendline("USER {ident} * * :{realname}".format(**options)) diff --git a/example-config.json b/example-config.json @@ -5,6 +5,7 @@ "nickname": "chatgpt", "ident": "chatgpt", "realname": "chatgpt", + "password": "", "channels": ["#rj1"], "auth_token": "", "cookie": "",