mirror of
https://github.com/markqvist/NomadNet.git
synced 2025-03-25 16:18:16 -04:00
Node announce handling.
This commit is contained in:
parent
d54483d7e3
commit
f0fae68e31
@ -22,16 +22,14 @@ class Node:
|
||||
self.register_pages()
|
||||
self.register_files()
|
||||
|
||||
if self.name == None:
|
||||
self.name = self.app.peer_settings["display_name"]+"'s Node"
|
||||
|
||||
RNS.log("Node \""+self.name+"\" ready for incoming connections on "+RNS.prettyhexrep(self.destination.hash), RNS.LOG_VERBOSE)
|
||||
|
||||
if self.app.node_announce_at_start:
|
||||
self.announce()
|
||||
|
||||
if self.name == None:
|
||||
name_string = self.app.peer_settings["display_name"]+"'s Node"
|
||||
else:
|
||||
name_string = self.name
|
||||
|
||||
RNS.log("Node \""+name_string+"\" ready for incoming connections on "+RNS.prettyhexrep(self.destination.hash), RNS.LOG_VERBOSE)
|
||||
|
||||
|
||||
def register_pages(self):
|
||||
self.servedpages = []
|
||||
|
@ -327,12 +327,12 @@ class NomadNetworkApp:
|
||||
if not "announce_at_start" in self.config["node"]:
|
||||
self.node_announce_at_start = False
|
||||
else:
|
||||
self.node_announce_at_start = self.config["announce_at_start"].as_bool("announce_at_start")
|
||||
self.node_announce_at_start = self.config["node"]["announce_at_start"]
|
||||
|
||||
if not "announce_interval" in self.config["node"]:
|
||||
self.node_announce_interval = 720
|
||||
else:
|
||||
value = self.config["announce_interval"].as_int("announce_interval")
|
||||
value = self.config["node"].as_int("announce_interval")
|
||||
if value < 1:
|
||||
value = 1
|
||||
self.node_announce_interval = value
|
||||
|
Loading…
x
Reference in New Issue
Block a user