From: plugd Date: Sun, 11 Aug 2024 12:12:42 +0000 (+0200) Subject: Started work on nncp handler. X-Git-Url: https://thelambdalab.xyz/gitweb/index.cgi?a=commitdiff_plain;h=b3f8ec808da7e8a91b3b5fcd74f791ac494e1057;p=qwikboard.git Started work on nncp handler. --- 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()