Switch to edit mode.
Name(s): www_control1: "Display the control half of the screen. Include a 'Tell Moderator' button, and links to the Moderator controls."
2: caller == this || raise(E_PERM)
3: {id, pw, md, where, tx} = args[1]
4: actives = {}
5: for dude in ($list_utils:flatten(this:actives()))
6: if (!(dude == id || dude in $su:explode(id, "|")))
7: actives = setadd(actives, dude)
8: endif
9: endfor
10: player:tell("You are ", id, ".")
11: player:tell($string_utils:english_list(actives, "Nobody else is active.", " and ", ", ", ","))
12: length(actives) > 1 && player:tell("are active.")
13: length(actives) == 1 && player:tell("is active.")
14: main_mode = md[1] == "C" ? "F" + md[2] | md
15: clean_url = $www:integrate_cgi({{"ID", id}, {"PW", pw}, {"MD", main_mode}, {"SN", "0"}})
16: if (where == 1)
17: setup = tostr("You can <A TARGET=\"NEW\" HREF=\"/", toint(this.setup), clean_url, "\">add & delete</A>")
18: talk = tostr("control <A TARGET=\"NEW\" HREF=\"/", toint(this.talk), clean_url, "\">who can talk</A>.")
19: if (valid(this.setup) && valid(this.talk))
20: player:tell(setup, " users and ", talk)
21: elseif (valid(this.setup))
22: player:tell(setup, "users.")
23: elseif (valid(this.talk))
24: player:tell("You can", talk)
25: endif
26: endif
27: if (valid(this.transcript))
28: $msg:mtell("transcript", tostr(toint(this.transcript), clean_url, "&TX="))
29: endif
30: player:tell("<FORM", md == "CR" ? " TARGET=\"_top\"" | "", " ACTION=\"/", toint(this), "\"><INPUT NAME=\"ID\" TYPE=\"hidden\" VALUE=\"", strsub(id, "\"", """), "\"><INPUT NAME=\"PW\" TYPE=\"hidden\" VALUE=\"", pw, "\"><INPUT NAME=\"MD\" TYPE=\"hidden\" VALUE=\"", md == "CR" ? "FR" | md, "\"><INPUT NAME=\"SN\" TYPE=\"hidden\" VALUE=\"", random($maxint), "\">")
31: player:tell("<INPUT NAME=\"TX\" TYPE=\"text\" VALUE=\"\" SIZE=\"80\" MAXLENGTH=\"200\"><P>")
32: this.sayit && player:tell("<INPUT NAME=\"style\" TYPE=\"submit\" VALUE=\"", this.sayit, "\">")
33: this.doit && player:tell("<INPUT NAME=\"style\" TYPE=\"submit\" VALUE=\"", this.doit, "\">")
34: if (where != 1)
35: this.tellmod && player:tell("<INPUT NAME=\"style\" TYPE=\"submit\" VALUE=\"", strsub(this.tellmod, "%1", this.users[1][1]), "\">")
36: endif
37: $msg:mtell("control_tail")
38: player:tell("</FORM>")
39: "Last modified by Dax (#789) on Tue May 3 14:11:55 2005 MDT."