Simplify is_first_relay
This commit is contained in:
parent
b5326e92a1
commit
22e853a3f7
|
@ -29,9 +29,7 @@ def is_first_relay(net, num):
|
||||||
:param num: number or relay
|
:param num: number or relay
|
||||||
:return: True if we are the first relay, False otherwise
|
:return: True if we are the first relay, False otherwise
|
||||||
"""
|
"""
|
||||||
cur_relay = 0
|
first_relay = get_first_relay(net)
|
||||||
max_relay = len(main.network[net].relays.keys())
|
if not first_relay:
|
||||||
while cur_relay > max_relay:
|
return False
|
||||||
name = net + str(cur_relay)
|
return first_relay.num == num
|
||||||
if name in main.IRCPool.keys():
|
|
||||||
return cur_relay == num
|
|
||||||
|
|
Loading…
Reference in New Issue