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

classes: track hopcount in Server

This commit is contained in:
James Lu 2017-09-23 22:35:55 -07:00
parent 76a0eb78e3
commit 663bfe462c

View File

@ -1630,6 +1630,13 @@ class Server():
self.desc = desc self.desc = desc
self._irc = irc self._irc = irc
assert uplink is None or uplink in self._irc.servers, "Unknown uplink %s" % uplink
if uplink is None:
self.hopcount = 1
else:
self.hopcount = self._irc.servers[uplink].hopcount + 1
# Has the server finished bursting yet? # Has the server finished bursting yet?
self.has_eob = False self.has_eob = False