3
0
mirror of https://github.com/jlu5/PyLink.git synced 2024-11-01 01:09:22 +01:00

Drop Irc prefix from IrcServer/User/Channel classes

This commit is contained in:
James Lu 2017-06-15 21:54:40 -07:00
parent d98d522387
commit c4f6d626d5

View File

@ -1260,7 +1260,7 @@ class PyLinkIRCNetwork(PyLinkNetworkCoreWithUtils):
Irc = PyLinkIRCNetwork Irc = PyLinkIRCNetwork
class IrcUser(): class User():
"""PyLink IRC user class.""" """PyLink IRC user class."""
def __init__(self, nick, ts, uid, server, ident='null', host='null', def __init__(self, nick, ts, uid, server, ident='null', host='null',
realname='PyLink dummy client', realhost='null', realname='PyLink dummy client', realhost='null',
@ -1299,14 +1299,15 @@ class IrcUser():
def __repr__(self): def __repr__(self):
return 'IrcUser(%s/%s)' % (self.uid, self.nick) return 'IrcUser(%s/%s)' % (self.uid, self.nick)
IrcUser = User
class IrcServer(): class Server():
"""PyLink IRC server class. """PyLink IRC server class.
uplink: The SID of this IrcServer instance's uplink. This is set to None uplink: The SID of this PyLinkServer instance's uplink. This is set to None
for the main PyLink PseudoServer! for the main PyLink server.
name: The name of the server. name: The name of the server.
internal: Whether the server is an internal PyLink PseudoServer. internal: Whether the server is an internal PyLink server.
""" """
def __init__(self, uplink, name, internal=False, desc="(None given)"): def __init__(self, uplink, name, internal=False, desc="(None given)"):
@ -1318,8 +1319,9 @@ class IrcServer():
def __repr__(self): def __repr__(self):
return 'IrcServer(%s)' % self.name return 'IrcServer(%s)' % self.name
IrcServer = Server
class IrcChannel(): class Channel():
"""PyLink IRC channel class.""" """PyLink IRC channel class."""
def __init__(self, name=None): def __init__(self, name=None):
# Initialize variables, such as the topic, user list, TS, who's opped, etc. # Initialize variables, such as the topic, user list, TS, who's opped, etc.
@ -1420,6 +1422,7 @@ class IrcChannel():
result.append(mode) result.append(mode)
return sorted(result, key=self.sortPrefixes) return sorted(result, key=self.sortPrefixes)
IrcChannel = Channel
class Protocol(): class Protocol():
"""Base Protocol module class for PyLink.""" """Base Protocol module class for PyLink."""