Subj : returning user node numbers
To   : Ice
From : Digital Man
Date : Fri Jun 10 2011 04:12 pm

 Re: returning user node numbers
 By: Ice to All on Thu Jun 09 2011 06:23 pm

> is there a way to get a user's node number?
>
> example:
>
> 1 - Sysop at main menu via telnet
> 2 - test  at main menu via telnet
> 3 - john  running ChatRoom via telnet
> 4 - jane running ChatRoom via telnet
>
> john's info would be stored in the database under [node 3]
>
> so im trying to figure out how to get that number.
>
> var nodetext = "node" + user.nodenumber;

Most users aren't on a node, so what this 'user' object in the above context?
You can get the current node (of the user for which the current JS context is
executing) with the bbs.node_num property. If you want to see if a current user
is online, you can look thorugh the system.node_list array and see if the
useron property matches the user number you're interested in (see
exec/nodelist.js for an example).

                                           digital man

Synchronet "Real Fact" #68:
You can purchase the BBS Documentary DVD set at http://bbsdocumentary.com/order/

---
� Synchronet � Vertrauen � Home of Synchronet � telnet://vert.synchro.net