mirror of
https://github.com/TheCommsChannel/TC2-BBS-mesh.git
synced 2025-03-05 20:51:53 -08:00
Compare commits
6 commits
141eb05156
...
6d7e1f4ad2
Author | SHA1 | Date | |
---|---|---|---|
|
6d7e1f4ad2 | ||
|
cd2c4c9cb5 | ||
|
c0003ec536 | ||
|
7d9de709c3 | ||
|
ab228e97f0 | ||
|
03d8aebbe1 |
|
@ -135,7 +135,7 @@ def handle_stats_steps(sender_id, message, step, interface):
|
||||||
total_nodes = len(interface.nodes)
|
total_nodes = len(interface.nodes)
|
||||||
else:
|
else:
|
||||||
time_limit = current_time - seconds
|
time_limit = current_time - seconds
|
||||||
total_nodes = sum(1 for node in interface.nodes.values() if node.get('lastHeard', 0) >= time_limit)
|
total_nodes = sum(1 for node in interface.nodes.values() if node.get('lastHeard') is not None and node['lastHeard'] >= time_limit)
|
||||||
total_nodes_summary.append(f"- {period}: {total_nodes}")
|
total_nodes_summary.append(f"- {period}: {total_nodes}")
|
||||||
|
|
||||||
response = "Total nodes seen:\n" + "\n".join(total_nodes_summary)
|
response = "Total nodes seen:\n" + "\n".join(total_nodes_summary)
|
||||||
|
|
|
@ -76,7 +76,7 @@ def merge_config(system_config:dict[str, Any], args:argparse.Namespace) -> dict[
|
||||||
system_config['port'] = args.port
|
system_config['port'] = args.port
|
||||||
|
|
||||||
if args.host is not None:
|
if args.host is not None:
|
||||||
system_config['host'] = args.host
|
system_config['hostname'] = args.host
|
||||||
|
|
||||||
return system_config
|
return system_config
|
||||||
|
|
||||||
|
|
|
@ -1,6 +1,6 @@
|
||||||
#!/bin/sh
|
#!/bin/sh
|
||||||
if [ ! -f "/config/config.ini" ]; then
|
if [ ! -f "/config/config.ini" ]; then
|
||||||
cp "/TC2-BBS-mesh/config.ini" "/config/config.ini"
|
cp "/TC2-BBS-mesh/example_config.ini" "/config/config.ini"
|
||||||
fi
|
fi
|
||||||
if [ ! -f "/config/fortunes.txt" ]; then
|
if [ ! -f "/config/fortunes.txt" ]; then
|
||||||
cp "/TC2-BBS-mesh/fortunes.txt" "/config/fortunes.txt"
|
cp "/TC2-BBS-mesh/fortunes.txt" "/config/fortunes.txt"
|
||||||
|
|
Loading…
Reference in a new issue