Fri 20/12/2002 8:59 PM [encore] Re: Accessing @who via web by Alexandre Borgia My suggestion would be to either "open Mootcan" or log via telnet and type "who" on login-prompt :) If you actually want to implement this function I'd be glad to share a custom "Who" object we have on our MOO. It is based on the $who_browser, but does not deal with any "logged-in" technicalities or wiz-perms. It is kindof rustic but does the trick :) How to create it: @create $encore_web_object named Who @verb Who:_html this none this rdx Program the verb as follows: (Modified slightly then Tested and Debugged by KRJ September 3, 2006) "Usage: Called as a WEB object by browser access to the object number."; "Code based on $who_browser:main_html. Original credits are listed there."; "Code provided by Alexandre Borgia via EnCore mailing list"; "Fri 20/12/2002 8:59 PM"; user = args[1]; who_listing = players = notice = {}; title = "Who is online?"; if (connected_players()) who_list = {}; base_url = tostr("http://", $network.site, ":", $network.webport, "/"); "Compile list of connected users, and sort by idle time"; for person in (connected_players()) $command_utils:suspend_if_needed(0); if (!($object_utils:has_property(person, "invis") && person.invis)) "Do not show invisible users in the who list."; players = setadd(players, {person, connected_seconds(person), idle_seconds(person), person.location}); endif endfor if (players) sorted_list = $list_utils:sort_alist(players, 3); "Put values from sorted list into four collumns"; users = {"Name
"}; connected = {"Connected
"}; idle = {"Idle Time
"}; location = {"Location

"}; activity = {"Activity
"}; for n in (sorted_list) $command_utils:suspend_if_needed(0); OBJ = toobj(n[1]); link = tostr("", $encore_web_utils:get_icon(user, OBJ), "", OBJ.name, ""); if (OBJ.xpress_on) link = link + tostr(""); endif users = {@users, tostr(link)}; connected = {@connected, tostr($string_utils:from_seconds(connected_seconds(n[1])))}; idle = {@idle, tostr($string_utils:from_seconds(idle_seconds(n[1])))}; if ($object_utils:isa(OBJ.location, $generic_editor)) location_link = OBJ.location.name; else location_link = tostr("", OBJ.location.name, ""); endif location = {@location, tostr(location_link)}; activity = {@activity, tostr(OBJ.doing)}; endfor users = {@users, "
"}; connected = {@connected, "
"}; idle = {@idle, "
"}; location = {@location, "
"}; activity = {@activity, "
"}; who_listing = $encore_web_utils:generate_table(user, {users, connected, idle, location, activity}, this, "1"); if (length(sorted_list) == 1) verb = " is "; noun = " person "; else verb = " are "; noun = " people "; endif notice = {tostr("

There ", verb, length(sorted_list), noun, " in ", $network.MOO_name, " on ", $time_utils:time_sub("$D $N $T, $Y, at $O:$M $P,$Z", time())), "

"}; endif else notice = {tostr("

Nobody is connected to ", $network.MOO_name, " at this time.

")}; endif body = {@notice, @who_listing}; return {"", title, "", @body, ""};