mirror of
https://github.com/jlu5/PyLink.git
synced 2024-11-23 19:19:31 +01:00
Move some IRC-specific attributes to IRCNetwork
This commit is contained in:
parent
fb34392fca
commit
c3cdf63253
11
classes.py
11
classes.py
@ -74,14 +74,10 @@ class PyLinkNetworkCore(utils.DeprecatedAttributesObject, utils.CamelCaseToSnake
|
||||
self.pingfreq = self.serverdata.get('pingfreq') or 90
|
||||
self.pingtimeout = self.pingfreq * 2
|
||||
|
||||
self.queue = None
|
||||
|
||||
self.connected = threading.Event()
|
||||
self.aborted = threading.Event()
|
||||
self.reply_lock = threading.RLock()
|
||||
|
||||
self.pingTimer = None
|
||||
|
||||
# Sets the multiplier for autoconnect delay (grows with time).
|
||||
self.autoconnect_active_multiplier = 1
|
||||
|
||||
@ -1130,6 +1126,13 @@ class PyLinkNetworkCoreWithUtils(PyLinkNetworkCore):
|
||||
_getUid = _get_UID
|
||||
|
||||
class IRCNetwork(PyLinkNetworkCoreWithUtils):
|
||||
def __init__(self, *args, **kwargs):
|
||||
super().__init__(*args, **kwargs)
|
||||
|
||||
self.connection_thread = None
|
||||
self.queue = None
|
||||
self.pingTimer = None
|
||||
|
||||
def _schedule_ping(self):
|
||||
"""Schedules periodic pings in a loop."""
|
||||
self.ping()
|
||||
|
Loading…
Reference in New Issue
Block a user