View/Edit #330:tell_www_body

Switch to edit mode.

Name(s): tell_www_body
1:  "Print a custom header message."
2:  caller == this || raise(E_PERM)
3:  player:tell("<IMG SRC=\"http://files.moo.ca/pics/mc_who.jpg\" WIDTH=170 HEIGHT=234 ALIGN=\"right\" ALT=\"[Who is on the MOO?]\">")
4:  player:tell("<H2>The following players are currently online:</H2>")
5:  "args[3] is a list of options that were determined in tell_www_page."
6:  options = args[$]
7:  rank = "Rank" in options
8:  location = "Location" in options
9:  times = "Times" in options
10: network = "Network" in options && player.user:isa($guardian)
11: email = player.user.wizard && "Email" in options
12: line = {"Player"}
13: rank && (line = {@line, "Rank"})
14: location && (line = {@line, "Location"})
15: times && (line = {@line, "Connect Time", "Idle Time"})
16: network && (line = {@line, "Network"})
17: email && (line = {@line, "E-mail"})
18: info = {line}
19: for dude in (setremove(connected_players(), player))
20:   $command_utils:suspend_if_needed()
21:   if (dude:isa($player))
22:     line = {tostr("<a href=\"/~", dude.name, "\" class=\"who\">", `dude:title() ! ANY => dude.name', "</a> (", dude, ")")}
23:   else
24:     line = {tostr("<a href=\"", $www.url, $www:find_ref(dude), "\" class=\"who\">", `dude:title() ! ANY => dude.name', "</a> (", dude, ")")}
25:   endif
26:   rank && (line = {@line, $object_utils:rank(dude)})
27:   if (location)
28:     loc = dude.location
29:     line = {@line, tostr("<a href=\"", $www.url, $www:find_ref(loc), "\" class=\"who\">", loc:title(), "</a>")}
30:   endif
31:   if (times)
32:     line = {@line, $string_utils:from_seconds(dude:connected_seconds()), $string_utils:from_seconds(dude:idle_seconds())}
33:   endif
34:   if (network)
35:     line = {@line, $string_utils:connection_hostname(connection_name(dude))}
36:   endif
37:   if (email)
38:     address = `dude:isa($webber) ? dude.user.email_address | dude.email_address ! E_PROPNF'
39:     line = {@line, address ? tostr("<A HREF=\"/finger?", address, "\">", address, "</A>") | "&nbsp"}
40:   endif
41:   info = {@info, line}
42: endfor
43: if (length(info))
44:   player:tellColumns($list_utils:make(length(info[1])), @info)
45: else
46:   player:tell("I don't see anyone online.")
47: endif
48: player:tell("<FORM>Choose what columns to show:")
49: player:tell("<BR><INPUT TYPE=\"checkbox\" NAME=\"Rank\"", rank ? " CHECKED>" | ">", " Rank")
50: player:tell("<BR><INPUT TYPE=\"checkbox\" NAME=\"Location\"", location ? " CHECKED>" | ">", " Location")
51: player:tell("<BR><INPUT TYPE=\"checkbox\" NAME=\"Times\"", times ? " CHECKED>" | ">", " Times")
52: if (player.user:isa($guardian))
53:   player:tell("<BR><INPUT TYPE=\"checkbox\" NAME=\"Network\"", network ? " CHECKED>" | ">", " Network Connection")
54:   if (player.user.wizard)
55:     player:tell("<BR><INPUT TYPE=\"checkbox\" NAME=\"Email\"", email ? " CHECKED>" | ">", " E-mail Address")
56:   endif
57: endif
58: player:tell("<BR><INPUT TYPE=\"submit\" VALUE=\"Submit.\"></FORM>")
59: if (!player.user_agent)
60:   "The GET request may arrive before the User_Agent info."
61:   suspend(1)
62: endif
63: if (index(player.user_agent, "Mozilla"))
64:   player:tell("<P>This page will automatically reload every ", $tcm ? "five minutes." | "minute.")
65:   player:tell(this.addfunction)
66:   player:tell("<HR><P><A HREF='javascript:addNetscapePanel();'><IMG SRC='", $www:fileURL(this, "add-button.gif"), "' BORDER=0 height=45 width=100 ALT='[Add Sidebar]'></A> Add the Moo who listing to your Mozilla/Netscape 6 sidebar.")
67:   player:tell("<P><a href='", $www:fileURL(this, "who.cdf"), "'><img src='", $www:fileURL(this, "addtodesktop.gif"), "' width=136 height=20 border=0 alt='[Add to IE Desktop]'></a> Add to IE Active Desktop.")
68: endif
69: "Last modified by Dax (#789) on Thu May  5 15:58:43 2005 MDT."

Verb arguments: this none this
Verb perms: Readable eXecutable NOT-Debug
Verb owned by: Dax (#789)

You are not logged in.

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