From b3f8ec808da7e8a91b3b5fcd74f791ac494e1057 Mon Sep 17 00:00:00 2001 From: plugd Date: Sun, 11 Aug 2024 14:12:42 +0200 Subject: [PATCH] Started work on nncp handler. --- obbs | 18 ++++++++++++++++++ 1 file changed, 18 insertions(+) diff --git a/obbs b/obbs index 086734c..a808233 100755 --- a/obbs +++ b/obbs @@ -24,6 +24,7 @@ Here COMMAND is one of: init qwkout repin + nncp_handler You can also use the -c option to specify an alternative configuration file. (The default is the file "config.lua" in the current directory.)]] @@ -410,6 +411,23 @@ the 8 character max ID of the BBS, but obbs doesn't care about this.]] end +function cmd.nncp_handler() + load_config() + + local user_name = os.getenv("NNCP_SENDER") + + if not user_name then + print [[The nncp_handler command is intended to be called by nncp on +receipt of an exec packet. For instance, the offline BBS could +be made accessible by user (node) NODENAME by adding the following +to their neigh entry in the /etc/nncp.hjson file + +exec: { + obbs: ["/usr/bin/obbs -c /var/share/obbs/config.lua nncp"] +}]] + +end + -- Main local function main() -- 2.20.1