Skip to content
Snippets Groups Projects
Commit de93b24e authored by rswindell's avatar rswindell
Browse files

Basic finger service (just list the nodes with activity).

parent 9dc81113
No related branches found
No related tags found
No related merge requests found
// fingerservice.js
load("nodedefs.js");
function write(str)
{
client.socket.send(str);
}
var user = new User(1);
for(n=0;n<system.node_list.length;n++) {
write(format("Node %2d ",n+1));
if(system.node_list[n].status==NODE_INUSE) {
user.number=system.node_list[n].useron;
write(format("%s (%u %s) ", user.alias, user.age, user.gender));
write(format(NodeAction[system.node_list[n].action],system.node_list[n].aux));
} else
write(format(NodeStatus[system.node_list[n].status],system.node_list[n].aux));
write("\r\n");
}
\ No newline at end of file
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment