Nice list, Michael! My two cents follows:
> switch_player(<obj1>, <obj2>)
Wiz-only. Silently switches the player associated with this
connection from obj1 to obj2. obj1 must be connected and obj2 must be
a user/player. I use this in do_login_command() verbs that read or
suspend (which prevents the normal player selection mechanism from
working.
> exec({<cmd>, <arg>...}, <in>) => {<code>, <out>, <err>}
Wiz-only. Asynchronously executes the program pointed to by filename
<cmd>, passing the arguments <args>, and sending the string <in> on
stdin. The current task is suspended until the program exits. When
the program exits the task is resumed, the call to `exec()' returns
with the return code of the process in <code>, and anything written to
stdout or stderr in <out> and <err> respectively. <in>, <out> and
<err> are all binary strings. The program to be executed must be in
the directory "executables/" inside of the directory in which the
server is running.
> generate_json(<json>, [<opts>])
> parse_json(<str>, [<opts>])
Generate/parse a JSON string. <opts> specifies how primitive values
are handled. "common-subset" maps floats/ints to JSON numbers and
everything else to strings. "embedded-types" embeds MOO type
information in the JSON strings. For example, E_FLOAT becomes
"E_FLOAT|err"; likewise, "E_FLOAT|err" is parsed as E_FLOAT. The type
is the three (or four) letter abbreviation for the MOO type: err, str,
obj, etc.
> encode_base64(<str>)
> decode_base64(<str>)
Base64 encode/decode <str>. <str> is a binary string.
> isa(<obj1>, <obj2>)
Returns true if <obj1> is a descendant of <obj2>, otherwise false.
> respond_to(<obj>, <verb>)
Returns true if <verb> is callable on <obj>, taking into account
inheritance, wildcards (star verbs), etc. otherwise false. If the
caller is permitted to read the object (because the object's `r' flag
is true, or the caller is the owner or a wizard) the true value is a
list containing the object number of the object that defines the verb
and the full verb name(s). Otherwise, the numeric value `1' is
returned.
> string_hash(<str>, [<str>])
> binary_hash(<str>, [<str>])
> value_hash(<any>, [<str>])
Extends the existing built-ins to take an optional second argument
specifying the hash algorithm. Currently supports "sha256" (the
default), "sha1" and "md5". MD5 exists for backwards compatibility
but _should not be used as a cryptographic hash_ anymore (other uses
are okay).
> string_hmac(<str>, <key>)
> binary_hmac(<str>, <key>)
> value_hmac(<any>, <key>)
Computes a SHA256 HMAC from the value and the given key. <key> is a
binary string.
> mapkeys(<map>)
> mapvalues(<map>)
Returns the given map's keys or values, respectively.
> mapdelete(<map>, <key>)
Deletes the key/value pair from the map, given the pair's <key>.
Returns the updated map.
Hopefully I haven't missed anything.
Todd
On May 14, 3:35 pm, michael munson <
michael.d.mun...@gmail.com> wrote:
> Heres some I know of:
>
> isa(obj,obj)
> switch_player(obj,obj)
> generate_json(ANY)
> parse_json(STR)
> read_http(str,obj)
> exec(list);
> all the normal FileIO builtins
> string_hash(str,[str]);
> binary_hash(str,[str]);
> value_hash(any,[str]);
> string_hmac(str,str);
> binary_hmac(str,str);
> encode_base64(str)
> decode_base64(str)
> mapdelete(map,any)
> mapkeys(map)
> mapvalues(map)
>
> may not be a complete list
>