Skip to content

Commit

Permalink
👹 Feed the hobgoblins (delint).
Browse files Browse the repository at this point in the history
  • Loading branch information
jaraco committed Jul 14, 2024
1 parent 4bc4f14 commit 98dc33d
Showing 1 changed file with 13 additions and 6 deletions.
19 changes: 13 additions & 6 deletions scripts/sasl-ssl-cat.py
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
# This program is free without restrictions; do anything you like with
# it.
# IMPORTANT: sasl_login must equal your nickserv account name
#
#
# Matthew Blau <[email protected]>

import functools
Expand All @@ -30,7 +30,6 @@ def on_welcome(self, connection, event):
def on_login_failed(self, connection, event):
print(event)


def on_join(self, connection, event):
self.send_it()

Expand All @@ -47,10 +46,10 @@ def send_it(self):


def main():
server ="irc.libera.chat"
server = "irc.libera.chat"
port = 6697
nickname = "nickname"
account_name="username"
account_name = "username"
target = "##channel"
password = ""

Expand All @@ -59,12 +58,20 @@ def main():
context = ssl.create_default_context()
wrapper = functools.partial(context.wrap_socket, server_hostname=server)

c.connect(server, port, nickname, password,sasl_login=account_name, username=account_name, connect_factory=irc.connection.Factory(wrapper=wrapper))
c.connect(
server,
port,
nickname,
password,
sasl_login=account_name,
username=account_name,
connect_factory=irc.connection.Factory(wrapper=wrapper),
)
except irc.client.ServerConnectionError as x:
print(x)
sys.exit(1)
c.start()


if __name__ == "__main__":
main()
main()

0 comments on commit 98dc33d

Please sign in to comment.