Minor code cleanup remove annoying comments
This commit is contained in:
parent
7d0300a7a4
commit
6938bd4862
10
IRC.py
10
IRC.py
|
@ -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))
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue