From 26cbe67e6fc76c385e1618c2a694a55f6946060c Mon Sep 17 00:00:00 2001 From: Firepup Sixfifty Date: Sun, 5 Nov 2023 20:36:33 -0600 Subject: [PATCH] socket -> sock --- bot.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/bot.py b/bot.py index dc79c0f..cfd0b25 100644 --- a/bot.py +++ b/bot.py @@ -27,12 +27,12 @@ class bot: self.exitcode = f"bye {botnick.lower()}" self.np = re.compile(npbase.replace("MAX", f"{nicklen}")) self.queue = [] - self.socket = socket(AF_INET, SOCK_STREAM) + self.sock = socket(AF_INET, SOCK_STREAM) log(f"Start init for {server}", self.server) def connect(self) -> None: self.log(f"Joining {server}...") - self.socket.connect((self.address, self.port)) + self.sock.connect((self.address, self.port)) self.send(f"USER {botnick} {botnick} {botnick} {botnick}\n") self.send(f"NICK {botnick}\n") while ( @@ -67,7 +67,7 @@ class bot: def recv(self) -> bytes: if self.queue: return bytes(self.queue.pop(0)) - data = bytes(self.socket.recv(2048).strip(b"\r\n")) + data = bytes(self.sock.recv(2048).strip(b"\r\n")) if b"\r\n" in data: self.queue.extend(data.split(b"\r\n")) return bytes(self.queue.pop(0))