-
String for node
From
DesotoFireflite@VERT/VALHALLA to
All on Sun Dec 13 15:33:58 2020
I'm playing with Sync JS, and trying to learn it, but I am stumped as how to get the node number. To be honest, I've hacked bits and pieces to try to make one. Everything displays except the node. Here is the part I'm having a issue with. I marked the area with -----. If you can give me the correct line I need, or paremeter, and explain it like I'm a 5 year old, it will Be appreciated.ãã/* Display the first n users in the given array. */ãfunction displayLastCallers(users, limit)ã{ã for(var i = 0; (i < users.length) && (i < limit); i++)ã {ã var alias = formatString(users[i].alias, 16);ã alias = colorizeString(alias);ã var location = formatString(users[i].location, 20);ã location = colorizeString(location);ã var lastOn = formatDate(new Date(system.timestr(users[i].stats.laston_date)), "NNN. dd, y hh:mma");ã lastOn = formatString(lastOn, 22);ã lastOn = colorizeString(lastOn);ã var mode = formatString(users[i].connection, 6); ã mode = colorizeString(mode);ã ã var age = users[i].age;ã if(users[i].age <= 0) ã { ã age = " "; ã }ã else ã { ã age = formatString(age, 3); ã age = colorizeString(age);ã }ã------------------------------------------------------------------------------ãProblem Areaã var node = formatString(system[i].get_node, 2);ã node = colorizeString(node);ã------------------------------------------------------------------------------ã var lastCallerStr = alias + " " + age + " " + location + " " + lastOn + " " + mode + " " + node;ã ã console.gotoxy(4, 8 + i); ã console.print(lastCallerStr);ã }ã}ããSysOp: C.G. Learn, AKA: DesotoFirefliteãValhalla Home Services! - (Synchronet) - bbs.valhallabbs.comãValhalla II! - (GAP) - bbs.valhallabbs.com:24ãA Gamers Paradise - Over 150 Registered Online Game Doors!ããHome Of Odin's Maze Game Server!ãCome Play Trade Wars On Valhalla's T.W.G.S!ãã--- FART(n): An audio test of one's waste-disposal system.ã þ Synchronet þ Valhalla Home Services þ USA þ
http://valhalla.synchro.netã
-
From
Digital Man@VERT to
DesotoFireflite on Sun Dec 13 13:51:26 2020
Re: String for nodeã By: DesotoFireflite to All on Sun Dec 13 2020 03:33 pmãã > I'm playing with Sync JS, and trying to learn it, but I am stumped as how toã > get the node number. To be honest, I've hacked bits and pieces to try toã > make one. Everything displays except the node. Here is the part I'm having aã > issue with. I marked the area with -----. If you can give me the correctã > line I need, or paremeter, and explain it like I'm a 5 year old, it will Beã > appreciated.ããThe current node number is available in JS via bbs.node_num.ãSee synchro.net/docs/jsobjs.html for the reference.ãã > /* Display the first n users in the given array. */ã > function displayLastCallers(users, limit)ã > {ã > for(var i = 0; (i < users.length) && (i < limit); i++)ã > {ã > var alias = formatString(users[i].alias, 16);ã > alias = colorizeString(alias);ã > var location = formatString(users[i].location, 20);ã > location = colorizeString(location);ã > var lastOn = formatDate(newã > Date(system.timestr(users[i].stats.laston_date)), "NNN. dd, y hh:mma");ã > lastOn = formatString(lastOn, 22);ã > lastOn = colorizeString(lastOn);ã > var mode = formatString(users[i].connection, 6);ã > mode = colorizeString(mode);ã >ã > var age = users[i].age;ã > if(users[i].age <= 0)ã > {ã > age = " ";ã > }ã > elseã > {ã > age = formatString(age, 3);ã > age = colorizeString(age);ã > } ------------------------------------------------------------------ã > ------------ Problem Areaã > var node = formatString(system[i].get_node, 2);ã > node = colorizeString(node); -----------------------------------ã > -------------------------------------------ãã"system" is not an array, so that syntax ("system[]") isn't going to work.ãAdditionally, a user does not have a "node number" property. A user can be on multiple nodes and any node can serve any user, so the association doesn't really make any sense. Are you looking for the last node number that a user used or a node that is currently in-use or what?ã-- ã digital manããSynchronet "Real Fact" #115:ãSynchronet v3.18b was released on September 20, 2020 (22 months after v3.17b)ãNorco, CA WX: 69.4øF, 18.0% humidity, 0 mph W wind, 0.00 inches rain/24hrsã---ã þ Synchronet þ Vertrauen þ Home of Synchronet þ [vert/cvs/bbs].synchro.netã
-
From
DesotoFireflite@VERT/VALHALLA to
Digital Man on Mon Dec 14 10:12:29 2020
Re: String for nodeã By: Digital Man to DesotoFireflite on Sun Dec 13 2020 01:51 pmãã DM> "system" is not an array, so that syntax ("system[]") isn't going to work.ã DM> Additionally, a user does not have a "node number" property. A user can beã DM> on multiple nodes and any node can serve any user, so the associationã DM> doesn't really make any sense. Are you looking for the last node numberã DM> that a user used or a node that is currently in-use or what? -- ã DM> digital manããActually, I'm looking for the node number this particular person is on at theãtime this .js is run. It's a last callers bulletin. ãã DM> The current node number is available in JS via bbs.node_num.ã DM> See synchro.net/docs/jsobjs.html for the reference.ããI think I tried that, but I'll try it again. I should have written down the things I've tried.ããAs always, thanksããSysOp: C.G. Learn, AKA: DesotoFirefliteãValhalla Home Services! - (Synchronet) - bbs.valhallabbs.comãValhalla II! - (GAP) - bbs.valhallabbs.com:24ãA Gamers Paradise - Over 150 Registered Online Game Doors!ããHome Of Odin's Maze Game Server!ãCome Play Trade Wars On Valhalla's T.W.G.S!ãã--- Don't eat the yellow snow!ã þ Synchronet þ Valhalla Home Services þ USA þ
http://valhalla.synchro.netã
-
From
DesotoFireflite@VERT/VALHALLA to
Digital Man on Mon Dec 14 16:05:33 2020
Re: String for nodeã By: Digital Man to DesotoFireflite on Sun Dec 13 2020 01:51 pmãã DM> The current node number is available in JS via bbs.node_num.ããvar node = formatString(bbs[i].node_num, 2);ã node = colorizeString(node);ããDoesn't workããvar node = formatString(bbs.node_num, 2);ã node = colorizeString(node);ããDoes work, but it fills every users node with the same number, looking to update for the one person only thats online at this time.ãã DM> "system" is not an array, so that syntax ("system[]") isn't going to work.ã DM> Additionally, a user does not have a "node number" property. A user can beã DM> on multiple nodes and any node can serve any user, so the associationã DM> doesn't really make any sense. Are you looking for the last node numberã DM> that a user used or a node that is currently in-use or what? -- ããthe node the person is on at the present time. the same as stored in synchronets users on today. ããSysOp: C.G. Learn, AKA: DesotoFirefliteãValhalla Home Services! - (Synchronet) - bbs.valhallabbs.comãValhalla II! - (GAP) - bbs.valhallabbs.com:24ãA Gamers Paradise - Over 150 Registered Online Game Doors!ããHome Of Odin's Maze Game Server!ãCome Play Trade Wars On Valhalla's T.W.G.S!ãã--- SENILE.COM found...Out of Memory...ã þ Synchronet þ Valhalla Home Services þ USA þ
http://valhalla.synchro.netã
-
From
Digital Man@VERT to
DesotoFireflite on Mon Dec 14 21:09:28 2020
Re: String for nodeã By: DesotoFireflite to Digital Man on Mon Dec 14 2020 10:12 amãã > Re: String for nodeã > By: Digital Man to DesotoFireflite on Sun Dec 13 2020 01:51 pmã >ã > DM> "system" is not an array, so that syntax ("system[]") isn't going toã > DM> work. Additionally, a user does not have a "node number" property. Aã > DM> user can be on multiple nodes and any node can serve any user, so theã > DM> association doesn't really make any sense. Are you looking for the lastã > DM> node number that a user used or a node that is currently in-use orã > DM> what? --ã > DM> digital manã >ã > Actually, I'm looking for the node number this particular person is on atã > the time this .js is run. It's a last callers bulletin.ããSo bbs.node_num will contain the *current* node number when the script is run. If you want to display the node number that a user used when they were last on, I suggest looking at logonlist.js and logonlist_lib.js.ãã > DM> The current node number is available in JS via bbs.node_num.ã > DM> See synchro.net/docs/jsobjs.html for the reference.ã >ã > I think I tried that, but I'll try it again. I should have written down theã > things I've tried.ããUnless you're writing the node number to a file for later retrieval/display, that's probably not what you're looking for. The current node number (and a lot of other information) is already being written to data/logon.jsonl, so probably best to just read/use that data (using the .js mods I pointed to you above).ã-- ã digital manããSynchronet/BBS Terminology Definition #70:ãSMTP = Simple Message Transfer ProtocolãNorco, CA WX: 55.5øF, 38.0% humidity, 1 mph S wind, 0.02 inches rain/24hrsã---ã þ Synchronet þ Vertrauen þ Home of Synchronet þ [vert/cvs/bbs].synchro.netã
-
From
Digital Man@VERT to
DesotoFireflite on Mon Dec 14 21:11:09 2020
Re: String for nodeã By: DesotoFireflite to Digital Man on Mon Dec 14 2020 04:05 pmãã > Re: String for nodeã > By: Digital Man to DesotoFireflite on Sun Dec 13 2020 01:51 pmã >ã > DM> The current node number is available in JS via bbs.node_num.ã >ã > var node = formatString(bbs[i].node_num, 2);ã > node = colorizeString(node);ã >ã > Doesn't workããI wouldn't expect it to: 'bbs' is not an array.ãã > var node = formatString(bbs.node_num, 2);ã > node = colorizeString(node);ã >ã > Does work, but it fills every users node with the same number, looking toã > update for the one person only thats online at this time.ããYes, like I stated in my previous message, that's probably not the data you're looking for (even though that's what you asked for).ãã > DM> work. Additionally, a user does not have a "node number" property. Aã > DM> user can be on multiple nodes and any node can serve any user, so theã > DM> association doesn't really make any sense. Are you looking for the lastã > DM> node number that a user used or a node that is currently in-use orã > DM> what? --ã >ã > the node the person is on at the present time. the same as stored inã > synchronets users on today.ããSee data/logon.jsonl and exec/logonlist.js and exec/load/logonlist_lib.jsã-- ã digital manããThis Is Spinal Tap quote #12:ãNigel Tufnel: Well, I don't know - wh-wh-... what're the hours?ãNorco, CA WX: 55.5øF, 38.0% humidity, 1 mph S wind, 0.02 inches rain/24hrsã---ã þ Synchronet þ Vertrauen þ Home of Synchronet þ [vert/cvs/bbs].synchro.netã
-
From
DesotoFireflite@VERT/VALHALLA to
Digital Man on Wed Dec 16 14:50:26 2020
Re: String for nodeã By: Digital Man to DesotoFireflite on Mon Dec 14 2020 09:11 pmãã >> the node the person is on at the present time. the same as stored inã >> synchronets users on today.ãã DM> See data/logon.jsonl and exec/logonlist.js and exec/load/logonlist_lib.jsããI saw those, and honestly, I don't have what it takes to figure it out. I bow my head in shame, but thats way over my head at the stage I am at trying to learn. I'll keep working on it, as I did figure out some other stuff, but I just can't figure out how to pull the node out of it. Thanks for trying to help, hopefully in time I will understand enough js to figure it out myself.ããThanks for trying DM, I do appreciate it. ããSysOp: C.G. Learn, AKA: DesotoFirefliteãValhalla Home Services! - (Synchronet) - bbs.valhallabbs.comãValhalla II! - (GAP) - bbs.valhallabbs.com:24ãA Gamers Paradise - Over 150 Registered Online Game Doors!ããHome Of Odin's Maze Game Server!ãCome Play Trade Wars On Valhalla's T.W.G.S!ãã--- Don't eat the yellow snow!ã þ Synchronet þ Valhalla Home Services þ USA þ
http://valhalla.synchro.netã
-
From
Digital Man@VERT to
DesotoFireflite on Wed Dec 16 13:17:17 2020
Re: String for nodeã By: DesotoFireflite to Digital Man on Wed Dec 16 2020 02:50 pmãã > Re: String for nodeã > By: Digital Man to DesotoFireflite on Mon Dec 14 2020 09:11 pmã >ã > >> the node the person is on at the present time. the same as stored inã > >> synchronets users on today.ã >ã > DM> See data/logon.jsonl and exec/logonlist.js andã > DM> exec/load/logonlist_lib.jsã >ã > I saw those, and honestly, I don't have what it takes to figure it out. Iã > bow my head in shame, but thats way over my head at the stage I am at tryingã > to learn. I'll keep working on it, as I did figure out some other stuff, butã > I just can't figure out how to pull the node out of it. Thanks for trying toã > help, hopefully in time I will understand enough js to figure it out myself.ã >ã > Thanks for trying DM, I do appreciate it.ããHere's a simplified example:ãã var list = load({}, "logonlist_lib.js").get();ã for(var l in list)ã print(list[l].node + " " + list[l].user.alias);ããThere's a lot more information available than just user alias and node number, but I was just including those fields as an example. You can use this to print the entire logon info object instead of just those 2 fields, if you're curious:ã print(lfexpand(JSON.stringify(list[l], null, 4)));ã-- ã digital manããSynchronet/BBS Terminology Definition #28:ãFDSZ = FOSSIL DSZ (by Chuck Forsberg)ãNorco, CA WX: 73.2øF, 21.0% humidity, 0 mph E wind, 0.00 inches rain/24hrsã---ã þ Synchronet þ Vertrauen þ Home of Synchronet þ [vert/cvs/bbs].synchro.netã
-
From
DesotoFireflite@VERT/VALHALLA to
Digital Man on Wed Dec 16 16:58:24 2020
Re: String for nodeã By: Digital Man to DesotoFireflite on Wed Dec 16 2020 01:17 pmãã DM> Here's a simplified example:ãã DM> var list = load({}, "logonlist_lib.js").get();ã DM> for(var l in list)ã DM> print(list[l].node + " " + list[l].user.alias);ãã DM> There's a lot more information available than just user alias and nodeã DM> number, but I was just including those fields as an example. You can useã DM> this to print the entire logon info object instead of just those 2 fields,ã DM> if you're curious: ã DM> print(lfexpand(JSON.stringify(list[l], null, 4)));ã DM> -- ããThanks, that does help, at least it puts it where I think I can get a grip on it mentally. I'll let you know how it goes after I work with it a bit. Again, thanks for all you do. ããSysOp: C.G. Learn, AKA: DesotoFirefliteãValhalla Home Services! - (Synchronet) - bbs.valhallabbs.comãValhalla II! - (GAP) - bbs.valhallabbs.com:24ãA Gamers Paradise - Over 150 Registered Online Game Doors!ããHome Of Odin's Maze Game Server!ãCome Play Trade Wars On Valhalla's T.W.G.S!ãã--- Don't You Know, Can't You See, Don't You Understand!ã þ Synchronet þ Valhalla Home Services þ USA þ
http://valhalla.synchro.netã