Minor code cleanup remove annoying comments

This commit is contained in:
Matt Arnold 2022-02-12 21:27:06 -05:00
parent 7d0300a7a4
commit 6938bd4862
1 changed files with 4 additions and 6 deletions

10
IRC.py
View File

@ -1,4 +1,5 @@
# Part of rabbitears See LICENSE for permissions
# Copyright (C) 2022 Matt Arnold
import socket import socket
import sys import sys
import time import time
@ -30,12 +31,10 @@ class IRCBot:
irc = None irc = None
def __init__(self, sock): def __init__(self, sock):
# Define the socket
self.irc = sock self.irc = sock
def send_privmsg(self, channel, msg): def send_privmsg(self, dst, msg):
# Transfer data self.irc.send(bytes("PRIVMSG " + dst + " :" + msg + LINEEND, "UTF-8"))
self.irc.send(bytes("PRIVMSG " + channel + " :" + msg + LINEEND, "UTF-8"))
def send_quit(self, quitmsg): def send_quit(self, quitmsg):
msg = f'QUIT :{quitmsg}' + LINEEND msg = f'QUIT :{quitmsg}' + LINEEND
@ -46,7 +45,6 @@ class IRCBot:
pass pass
def connect(self, server, port, channel, botnick, botpass, botnickpass): def connect(self, server, port, channel, botnick, botpass, botnickpass):
# Connect to the server
print("Connecting to: " + server) print("Connecting to: " + server)
self.irc.connect((server, port)) self.irc.connect((server, port))