• nodelist_handler.js cannot handle non-archived nodelists

    From Nigel Reed@1:103/705 to GitLab issue in main/sbbs on Wed Nov 1 14:04:04 2023
    open https://gitlab.synchro.net/main/sbbs/-/issues/669

    It seems that nodelist_handler.js requires the nodelist to be some sort of archive, like a .ZIP before it will be processed. I have a network just just started out a separate nodelist that is not in an archive and I'm unable to process it.

    if I leave out "match" then I get

    ```
    Working with 'HOBBYNET.307' in 'HNET_NODE'.
    ForceReplace enabled for area HNET_NODE.
    Unable to identify packer for 'HOBBYNET.307'
    ```

    when running jsexec tickit

    If I add a "match" then I get something like

    TIC file HOBBYNET.307 doesn't match 'HOBBYNET.[0123].*'

    Which obviously matches.
    --- SBBSecho 3.20-Linux
    * Origin: Vertrauen - [vert/cvs/bbs].synchro.net (1:103/705)
  • From Fernando Toledo@1:103/705 to GitLab note in main/sbbs on Mon Dec 11 08:16:00 2023
    https://gitlab.synchro.net/main/sbbs/-/issues/669#note_4538

    Hi! I use file_handler.js in some cases:
    ```
    [FSX_INFO]
    Dir=FSXNETINFO
    SourceAddress=21:2/151@fsxnet
    AKAMatching=false
    ForceReplace=true
    Handler = tickit/file_handler.js
    HandlerArg = { "match": "fsxinfo.zip", "files": [{ "source": "fsxnet.na", "destination": "/sbbs/fido/ECHOLIST.FSXNET" }]}
    ```
    Hopefully at some point both functionality can be merged into a single file so that it can be used for several cases.
    --- SBBSecho 3.20-Linux
    * Origin: Vertrauen - [vert/cvs/bbs].synchro.net (1:103/705)
  • From Nigel Reed@1:103/705 to GitLab note in main/sbbs on Mon Dec 11 08:37:53 2023
    https://gitlab.synchro.net/main/sbbs/-/issues/669#note_4539

    I will take a look into that. Thank you.
    --- SBBSecho 3.20-Linux
    * Origin: Vertrauen - [vert/cvs/bbs].synchro.net (1:103/705)
  • From Fernando Toledo@1:103/705 to GitLab note in main/sbbs on Sat Feb 17 20:14:34 2024
    https://gitlab.synchro.net/main/sbbs/-/issues/669#note_4864

    Hi @nelgin, I made this ugly patch on exec/load/tickit/file_handler.js to fallback copy file if archive format was not detected. Maybe @rswindell can help us to cleanup and write better code.

    It working for my for Hobbynet that delivery HOBBYNET.ZIP (for echolist) and HOBBYNET.??? (unpacket file for nodelist)

    my tickt.ini config for hobbynet:

    ```
    [HNET_NODE]
    Dir=hnet_node
    SourceAddress=954:895/37@hobbynet
    AKAMatching=true
    ForceReplace=true
    Handler=tickit/file_handler.js
    HandlerArg = { "match": "HOBBYNET*", "files": [{ "source": "HOBBYNET.*", "destination": "/sbbs/fido/NODELIST.HOBBYNET" }]}

    [HNET_INFO]
    Dir=hnet_info
    SourceAddress=954:895/37@hobbynet
    AKAMatching=true
    ForceReplace=true
    Handler = tickit/file_handler.js
    HandlerArg = { "match": "HOBBYNET.ZIP", "files": [{ "source": "HOBBYNET.NA", "destination": "/sbbs/fido/ECHOLIST.HOBBYNET" }]}

    ```


    ```diff
    --- file_handler.js.orig 2020-08-26 18:19:00.000000000 -0300
    +++ file_handler.js 2024-02-18 00:56:33.272600403 -0300
    @@ -107,8 +107,7 @@ function Handle_TIC(tic, ctx, arg) {
    f.close();

    if (unpack == undefined) {
    - log(LOG_ERROR, 'Unable to identify packer for ' + tic.file);
    - return false;
    + log(LOG_INFO, 'Unable to identify packer for ' + tic.file);
    }

    // Create a directory to extract to...
    @@ -129,10 +128,28 @@ function Handle_TIC(tic, ctx, arg) {
    }
    }

    - if (!run_and_log(unpack, tic.full_path, dir)) return false;
    + if (unpack == undefined) {
    + log(LOG_DEBUG, "No packer, direct copy file");
    + var sf = tic.full_path;
    + var df = backslash(dir) + tic.file;
    + if (!file_copy(sf , df)) {
    + log(LOG_ERROR, 'Failed to copy no packed file: ' + sf + ' to ' + df);
    + return;
    + }
    + }
    + else {
    + if (!run_and_log(unpack, tic.full_path, dir)) return false;
    + }

    cfg.files.forEach(function (e) {
    - var sf = backslash(dir) + e.source;
    + var sf;
    +
  • From Nigel Reed@1:103/705 to GitLab note in main/sbbs on Sat Feb 17 22:35:22 2024
    https://gitlab.synchro.net/main/sbbs/-/issues/669#note_4870

    Cool. You might want to clone the repo and then commit a change. It's usually going to get looked at faster rather than wait for someone to apply a diff.
    --- SBBSecho 3.20-Linux
    * Origin: Vertrauen - [vert/cvs/bbs].synchro.net (1:103/705)