From d7c6b65c58fdc8907031752ab0e76f90df8af853 Mon Sep 17 00:00:00 2001 From: Context 77 <126421199+ctx77@users.noreply.github.com> Date: Sun, 2 Mar 2025 21:15:57 +0100 Subject: [PATCH] use pre-send option to authenticate instead of send_to_user --- FaustBot/Communication/Connection.py | 13 ++++++++----- 1 file changed, 8 insertions(+), 5 deletions(-) diff --git a/FaustBot/Communication/Connection.py b/FaustBot/Communication/Connection.py index f414d12..2451ad6 100644 --- a/FaustBot/Communication/Connection.py +++ b/FaustBot/Communication/Connection.py @@ -152,12 +152,15 @@ class Connection(object): self.irc.send(f"NICK {self.details.get_nick()}\r\n".encode()) self.irc.send("USER botty botty botty :Botty \n".encode()) if self.details.get_pwd() != "": - self.send_to_user( - "NICKSERV", - f"identify {self.details.get_nick()} {self.details.get_pwd()} ", + self.irc.send( + f"PRIVMSG NICKSERV :identify {self.details.get_nick()} {self.details.get_pwd()} \r\n".encode() ) - # Sleep 15 Seconds to ensure that the Bot is fully logged in. - time.sleep(15.123) + # self.send_to_user( + # "NICKSERV", + # f"identify {self.details.get_nick()} {self.details.get_pwd()} ", + # ) + # Sleep a bit to ensure that the Bot is fully logged in. + time.sleep(2.123) self.irc.send(f"JOIN {self.details.get_channel()}\r\n".encode()) self.irc.send(f"WHO {self.details.get_channel()}\r\n".encode()) self.irc.send(f"MODE {self.details.get_nick()} -R\r\n".encode())