Pmatch()

From TinyMUX
Revision as of 00:48, 29 November 2010 by Ihavenomouth (talk | contribs) (New page: Category:Functions FUNCTION: {{Function|pmatch(<string>)}} Given the partial name of a player, it returns that player's dbref number. This partial name completion works i...)
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to navigation Jump to search


FUNCTION: pmatch(<string>)

Given the partial name of a player, it returns that player's dbref number. This partial name completion works identically to the partial name completion of the "page" command - i.e. it first attempts to match the normal names of all players connected or not), and if that fails, it tries to match the partial names of connected players. If no player is matched, it returns "#-1 NO MATCH". If multiple matches are found, it returns the first match, in order of connection time.

Pmatch() will also accept *<player> or #<db#>. If given a non-player dbref #, pmatch() will return "#-1 NO MATCH".