home bbs files messages ]

Just a sample of the Echomail archive

Cooperative anarchy at its finest, still active today. Darkrealms is the Zone 1 Hub.

   SYNC_SYSOPS      Synchronet Multinode BBS Software Suppor      33,243 messages   

[   << oldest   |   < older   |   list   |   newer >   |   newest >>   ]

   Message 31,345 of 33,243   
   Rob Swindell to GitLab issue in main/sbbs   
   Support alternate directory (e.g. mods/t   
   01 Mar 25 18:27:57   
   
   TZUTC: -0800   
   MSGID: 57399.sync_sys@1:103/705 2c29d864   
   PID: Synchronet 3.20c-Linux master/26d0b46e8 Feb 26 2025 GCC 12.2.0   
   TID: SBBSecho 3.23-Linux master/26d0b46e8 Feb 26 2025 GCC 12.2.0   
   BBSID: VERT   
   CHRS: ASCII 1   
   open https://gitlab.synchro.net/main/sbbs/-/issues/879   
      
   Use 'mods/text' since mods is already where other modified files are expected   
   to be placed.   
   And don't use 'text/mods' since that would potentially create issues when the   
   'text' directory is in a Git repo.   
      
   We could do this automatically for menu() files without issue, but printfile()   
   should require a new mode flag (P_MODS) to enable this behavior, otherwise,   
   it'd be pretty impossible to display files in the stock text directory   
   otherwise:   
      
   ```   
    /* for pauses, aborts and ANSI. 'str' is the path of the file to print      */   
    /* Called from functions menu and text_sec                                  */   
    /****************************************************************************/   
   -bool sbbs_t::printfile(const char* fname, int mode, int org_cols, JSObject*   
   obj)   
   +bool sbbs_t::printfile(const char* inpath, int mode, int org_cols, JSObject*   
   obj)   
    {   
           char* buf;   
           char  fpath[MAX_PATH + 1];   
   @@ -45,7 +45,16 @@ bool sbbs_t::printfile(const char* fname, int mode, int   
   org_cols, JSObject* obj)   
           int   l, length, savcon = console;   
           FILE *stream;   
      
   -       SAFECOPY(fpath, fname);   
   +       if (FULLPATH(fpath, inpath, sizeof fpath) == NULL)   
   +               SAFECOPY(fpath, inpath);   
   +       if ((mode & P_MODS) && cfg.mods_dir[0] != '\0') {   
   +               if (strncmp(fpath, cfg.text_dir, strlen(cfg.text_dir)) == 0) {   
   +                       char modpath[MAX_PATH + 1];   
   +                       snprintf(modpath, sizeof modpath, "%s%s",   
   cfg.mods_dir, fpath + strlen(cfg.text_dir));   
   +                       if(fexistcase(modpath))   
   +                               SAFECOPY(fpath, modpath);   
   +               }   
   +       }   
   ```   
      
   This would allow @include:filename@ to display a file from a mods/text dir if   
   we also did the following in sbbs_t::atcode():   
   ```   
   	if (!strncmp(sp, "INCLUDE:", 8)) {   
   		printfile(cmdstr(sp + 8, nulstr, nulstr, str), P_NOCRLF | P_SAVEATR |   
   P_ATCODES);   
   		return nulstr;   
   	}   
   ```   
      
   random_menu() would need a change like this:   
      
   ```   
   @@ -374,6 +383,12 @@ bool sbbs_t::random_menu(const char *name, int mode,   
   JSObject* obj)   
           str_list_t names = NULL;   
      
           SAFEPRINTF2(path, "%smenu/%s", cfg.text_dir, name);   
   +       if (cfg.mods_dir[0] != '\0') {   
   +               char modpath[MAX_PATH + 1];   
   +               SAFEPRINTF2(modpath, "%stext/menu/%s", cfg.mods_dir, name);   
   +               if (fexist(modpath))   
   +                       SAFECOPY(path, modpath);   
   +       }   
           if (glob(path, GLOB_NOESCAPE | GLOB_MARK, NULL, &g) != 0) {   
                   return false;   
           }   
   ```   
      
   menu_exists() and menu() would need a lot of changes that will be tricky to   
   test.   
   --- SBBSecho 3.23-Linux   
    * Origin: Vertrauen - [vert/cvs/bbs].synchro.net (1:103/705)   
   SEEN-BY: 10/0 1 102/401 103/1 13 17 705 105/81 106/201 124/5016 128/187   
   SEEN-BY: 153/7715 154/110 214/22 218/0 1 215 601 700 720 840 860 880   
   SEEN-BY: 226/30 227/114 229/110 114 206 317 400 426 428 470 550 700   
   SEEN-BY: 229/705 266/512 280/464 291/111 301/1 320/219 322/757 342/200   
   SEEN-BY: 396/45 460/58 633/280 712/848 902/26 5075/35   
   PATH: 103/705 218/700 229/426   
      

[   << oldest   |   < older   |   list   |   newer >   |   newest >>   ]


(c) 1994,  bbs@darkrealms.ca