From d00b3c6f8d833a1107a4ded0537b3de0c5ee5b10 Mon Sep 17 00:00:00 2001 From: Green Sky Date: Fri, 15 Dec 2023 11:43:46 +0100 Subject: [PATCH] add dht num closelist (with cap) to tox status command --- src/tox_commands.cpp | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/src/tox_commands.cpp b/src/tox_commands.cpp index c5b3786..d796a2d 100644 --- a/src/tox_commands.cpp +++ b/src/tox_commands.cpp @@ -38,6 +38,12 @@ void registerToxCommands( reply += "tcp-relayed"; } + + reply += "\ndht-closenum:"; + reply += std::to_string(tp.toxDHTGetNumCloselist()); + reply += "\ndht-closenum-announce-capable:"; + reply += std::to_string(tp.toxDHTGetNumCloselistAnnounceCapable()); + if (cr.all_of(contact_from)) { const auto con_opt = t.toxFriendGetConnectionStatus(cr.get(contact_from).friend_number); if (!con_opt.has_value() || con_opt.value() == Tox_Connection::TOX_CONNECTION_NONE) {