mirror of
https://github.com/jlu5/PyLink.git
synced 2024-11-30 14:49:28 +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.pingfreq = self.serverdata.get('pingfreq') or 90
|
||||||
self.pingtimeout = self.pingfreq * 2
|
self.pingtimeout = self.pingfreq * 2
|
||||||
|
|
||||||
self.queue = None
|
|
||||||
|
|
||||||
self.connected = threading.Event()
|
self.connected = threading.Event()
|
||||||
self.aborted = threading.Event()
|
self.aborted = threading.Event()
|
||||||
self.reply_lock = threading.RLock()
|
self.reply_lock = threading.RLock()
|
||||||
|
|
||||||
self.pingTimer = None
|
|
||||||
|
|
||||||
# Sets the multiplier for autoconnect delay (grows with time).
|
# Sets the multiplier for autoconnect delay (grows with time).
|
||||||
self.autoconnect_active_multiplier = 1
|
self.autoconnect_active_multiplier = 1
|
||||||
|
|
||||||
@ -1130,6 +1126,13 @@ class PyLinkNetworkCoreWithUtils(PyLinkNetworkCore):
|
|||||||
_getUid = _get_UID
|
_getUid = _get_UID
|
||||||
|
|
||||||
class IRCNetwork(PyLinkNetworkCoreWithUtils):
|
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):
|
def _schedule_ping(self):
|
||||||
"""Schedules periodic pings in a loop."""
|
"""Schedules periodic pings in a loop."""
|
||||||
self.ping()
|
self.ping()
|
||||||
|
Loading…
Reference in New Issue
Block a user