View/Edit #330:tell_www_sidebar

Switch to edit mode.

Name(s): tell_www_sidebar
1:  player:isa($webber) || raise(E_PERM)
2:  player:tell("<html><head><title>Who's on Moo Canada?</title><meta http-equiv=refresh content=60></head><body><FONT FACE='sans-serif' SIZE=1>")
3:  player:tell("<A HREF='http://www.moo.ca/' TARGET='_content'>Moo Canada</A> players currently online:")
4:  set_task_perms(player.user)
5:  if (connected = setremove(connected_players(), player))
6:    player:tell("<BR><TABLE CELLSPACING=2><TR><TH BGCOLOR='#cccccc'><FONT FACE='sans-serif' SIZE=1>Name</FONT></TH><TH BGCOLOR='#cccccc'><FONT FACE='sans-serif' SIZE=1>Conn</FONT></TH><TH BGCOLOR='#cccccc'><FONT FACE='sans-serif' SIZE=1>Idle</FONT></TH></TR>")
7:    for x in (connected)
8:      conns = connected_seconds(x)
9:      connm = conns / 60
10:     connh = conns / 3600
11:     idles = idle_seconds(x)
12:     idlem = idles / 60
13:     idleh = idles / 3600
14:     player:tell("<TR><TD BGCOLOR='#eeeeee'><FONT FACE='sans-serif' SIZE=1><A HREF=\"", $www.url, x:isa($player) ? "~" + x.name | $www:find_ref(x), "\" TARGET=\"_content\">", $html_utils:detag(x:title()), "</A></FONT></TD>")
15:     player:tell("<TD BGCOLOR='#eeeeee' ALIGN=right><FONT FACE='sans-serif' SIZE=1>", connh ? tostr(connh, "h") | (connm ? tostr(connm, "m") | tostr(conns, "s")), "</FONT></TD>")
16:     player:tell("<TD BGCOLOR='#eeeeee' ALIGN=right><FONT FACE='sans-serif' SIZE=1>", idleh ? tostr(idleh, "h") | (idlem ? tostr(idlem, "m") | tostr(idles, "s")), "</FONT></TD></TR>")
17:   endfor
18:   player:tell("</TABLE>")
19: else
20:   player:tell("<P><CENTER><I>I don't see anyone online.</I></CENTER>")
21: endif
22: if (!index(player.user_agent, "MSIE"))
23:   player:tell("<P ALIGN=\"right\"><A HREF=\"http://www.moo.ca/who/sidebar\">Reload</A></RIGHT>")
24: endif
25: player:tell("</FONT></BODY></HTML>")
26: "Last modified by Dax (#789) on Tue May  3 13:18:37 2005 MDT."

Verb arguments: this none this
Verb perms: Readable eXecutable NOT-Debug
Verb owned by: Lao-Tzu (#8084)

You are not logged in.

[home | help | who | search | setup | code]