3
0
mirror of https://github.com/jlu5/PyLink.git synced 2024-11-01 09:19:23 +01:00
PyLink/classes.py
James Lu 70480b8830 Make IrcChannel.users a set and add part handling
This should be everything needed for basic channel enumeration: closes #13.
2015-06-07 09:43:13 -07:00

36 lines
873 B
Python

class IrcUser():
def __init__(self, nick, ts, uid, ident='null', host='null',
realname='PyLink dummy client', realhost='null',
ip='0.0.0.0'):
self.nick = nick
self.ts = ts
self.uid = uid
self.ident = ident
self.host = host
self.realhost = realhost
self.ip = ip
self.realname = realname
self.identified = False
def __repr__(self):
return repr(self.__dict__)
class IrcServer():
def __init__(self, uplink):
self.uplink = uplink
self.users = []
def __repr__(self):
return repr(self.__dict__)
class IrcChannel():
def __init__(self):
self.users = set()
'''
self.ops = []
self.halfops = []
self.voices = []
'''
def __repr__(self):
return repr(self.__dict__)