mirror of
https://github.com/jlu5/PyLink.git
synced 2024-11-30 14:49:28 +01:00
classes: show instance type in classes.IrcUser/IrcChannel/IrcServer
This commit is contained in:
parent
27673aba0e
commit
b1aa4c2ec5
@ -469,7 +469,7 @@ class IrcUser():
|
|||||||
self.manipulatable = manipulatable
|
self.manipulatable = manipulatable
|
||||||
|
|
||||||
def __repr__(self):
|
def __repr__(self):
|
||||||
return repr(self.__dict__)
|
return 'IrcUser(%s)' % self.__dict__
|
||||||
|
|
||||||
class IrcServer():
|
class IrcServer():
|
||||||
"""PyLink IRC server class.
|
"""PyLink IRC server class.
|
||||||
@ -479,14 +479,16 @@ class IrcServer():
|
|||||||
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 PseudoServer.
|
||||||
"""
|
"""
|
||||||
|
|
||||||
def __init__(self, uplink, name, internal=False, desc="(None given)"):
|
def __init__(self, uplink, name, internal=False, desc="(None given)"):
|
||||||
self.uplink = uplink
|
self.uplink = uplink
|
||||||
self.users = set()
|
self.users = set()
|
||||||
self.internal = internal
|
self.internal = internal
|
||||||
self.name = name.lower()
|
self.name = name.lower()
|
||||||
self.desc = desc
|
self.desc = desc
|
||||||
|
|
||||||
def __repr__(self):
|
def __repr__(self):
|
||||||
return repr(self.__dict__)
|
return 'IrcServer(%s)' % self.__dict__
|
||||||
|
|
||||||
class IrcChannel():
|
class IrcChannel():
|
||||||
"""PyLink IRC channel class."""
|
"""PyLink IRC channel class."""
|
||||||
@ -504,7 +506,7 @@ class IrcChannel():
|
|||||||
self.topicset = False
|
self.topicset = False
|
||||||
|
|
||||||
def __repr__(self):
|
def __repr__(self):
|
||||||
return repr(self.__dict__)
|
return 'IrcChannel(%s)' % self.__dict__
|
||||||
|
|
||||||
def removeuser(self, target):
|
def removeuser(self, target):
|
||||||
"""Removes a user from a channel."""
|
"""Removes a user from a channel."""
|
||||||
|
Loading…
Reference in New Issue
Block a user