Player Request Board (#426)(an instance of generic thing made by Dredful)     A board with the wizards' scribblings about player requests and creations on it. Go to location of this object, Mayor's Office. VERB SOURCE CODE: get_request:
if (!(this:trust() && (caller == this)))
return E_PERM;
endif
"Returns: time requested, connection from, name, email";
which = args[1];
prelim = this.registrar:get_req(which);
full = this.registrar.(prelim[1][1][1]);
return {prelim[1][1][3], (c = $string_utils:words(full[1]))[length(c)], (d = $string_utils:words(full[length(full)]))[2],
d[3]};
.
trust: return player.wizard || (player in this.trust); . sum*mary:
if (!this:trust())
player:tell(E_PERM);
return;
endif
if (this.pending)
player:tell("Player requests pending:");
player:tell("");
player:tell("# Day Date ", $string_utils:left("Connected from", 25, " "), "
", $string_utils:left("Name", 11, " "), " ", $string_utils:left("Email", 25, "
"));
player:tell($string_utils:space(78, "-"));
for req in (this.pending)
info = this:get_request(req);
player:tell(req in this.pending, " ", tostr($time_utils:day(info[1])[1..3],
" ", $time_utils:mmddyy(info[1])[1..5]), " ", $string_utils:left(info[2], 25, "
")[1..25], " ", $string_utils:left(info[3], 11, " ")[1..11], " ", $string_utils:left(info[4],
25, " ")[1..25]);
endfor
player:tell($string_utils:space(78, "-"));
player:tell("NOTE: the above info is probably incomplete. Linelength considerations
made it necessary to cut off the length of the fields.");
player:tell("To see full information on a request, type `see # on #426'");
player:tell("Use @make-player
add_req rem_req:
if (!caller_perms().wizard)
return E_PERM;
endif
if (verb[1..3] == "add")
this.pending = setadd(this.pending, args[1]);
else
this.pending = setremove(this.pending, args[1]);
endif
.
see:
if (!this:trust())
player:tell(E_PERM);
return;
endif
which = tonum(dobjstr);
if (which && (which <= length(this.pending)))
msg = this.pending[which];
this.registrar:display_seq_full({msg, msg + 1}, tostr("Player Request Number
", tostr(which), ":"));
else
player:tell("There is no such request pending.");
endif
.
find_req:
if (!caller_perms().wizard)
return E_PERM;
endif
name = args[1];
if (!this.pending)
return 0;
endif
for req in (this.pending)
info = this:get_request(req);
if (name == info[3])
return req;
endif
endfor
return 0;
.
PROPERTY DATA:       registrar       pending       trust |