diff --git a/nomadnet/Node.py b/nomadnet/Node.py index ad08888..620a480 100644 --- a/nomadnet/Node.py +++ b/nomadnet/Node.py @@ -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 = [] diff --git a/nomadnet/NomadNetworkApp.py b/nomadnet/NomadNetworkApp.py index 5cbc41b..85e74de 100644 --- a/nomadnet/NomadNetworkApp.py +++ b/nomadnet/NomadNetworkApp.py @@ -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