• Parsing modopts.ini

    From Mortifis@VERT/ALLEYCAT to All on Thu Nov 14 11:28:56 2019
    I am trying to read a string from modopts.ini and wanting to split the stringãfiltering out whitespace and then iterating through the string for a match ...ããmodopts.ini example:ãã[mysection]ã something = bla blah bleh bladdie bluh bleããmy.jsããvar mystuff = load({}, 'modopts.ini', 'mysection');ããvar stuff = mystuff.something.split((/(\s+)/);ãããgives a JS TypeError: mystuff.something is undefinedããWhat am I doing wrong, please?ãã---ã þ Synchronet þ AlleyCat! BBS - http://alleycat.synchro.net:81ã
  • From Digital Man@VERT to Mortifis on Thu Nov 14 10:42:36 2019
    Re: Parsing modopts.iniã By: Mortifis to All on Thu Nov 14 2019 11:28 amãã > I am trying to read a string from modopts.ini and wanting to split theã > string filtering out whitespace and then iterating through the string for aã > match ...ã >ã > modopts.ini example:ã >ã > [mysection]ã > something = bla blah bleh bladdie bluh bleã >ã > my.jsã >ã > var mystuff = load({}, 'modopts.ini', 'mysection');ã >ã > var stuff = mystuff.something.split((/(\s+)/);ã >ã >ã > gives a JS TypeError: mystuff.something is undefinedã >ã > What am I doing wrong, please?ããThe second argument to load() should be 'modopts.js' there (not modopts.ini). See other modopts examples in exec/*.js.ããAlso, you could get a specific value from your 'mysection' (rather than the entire section as an object), like so:ãã var stuff = load({}, 'modopts.js', 'mysection', 'something');ããDocs here:ãhttp://wiki.synchro.net/custom:javascript:lib:modopts.jsãã digital manããSynchronet "Real Fact" #29:ãRob Swindell first called BBSes (at 300bps) with an Apple II computer in 1982.ãNorco, CA WX: 66.3øF, 78.0% humidity, 1 mph NW wind, 0.00 inches rain/24hrsã---ã þ Synchronet þ Vertrauen þ Home of Synchronet þ [vert/cvs/bbs].synchro.netã
  • From Mortifis@VERT/ALLEYCAT to Digital Man on Fri Nov 15 09:40:09 2019
    Re: Parsing modopts.iniã > By: Mortifis to All on Thu Nov 14 2019 11:28 amãã > > I am trying to read a string from modopts.ini and wanting to split theã > > string filtering out whitespace and then iterating through the string forã > > a match ...ãã > > modopts.ini example:ãã > > [mysection]ã > > something = bla blah bleh bladdie bluh bleãã > > my.jsãã > > var mystuff = load({}, 'modopts.ini', 'mysection');ãã > > var stuff = mystuff.something.split((/(\s+)/);ããã > > gives a JS TypeError: mystuff.something is undefinedãã > > What am I doing wrong, please?ãã > The second argument to load() should be 'modopts.js' there (notã > modopts.ini).ã ^^^^^^^^^^^^^ããDuh! LOL ... thank you, DMãã---ã þ Synchronet þ AlleyCat! BBS - http://alleycat.synchro.net:81ã