Core Utility Help

$login

$login

------

This object manages command parsing for unconnected players and governs the initiation of an actual connection. There are verbs pertaining to registration, controlling player creation, and doing site-locks (see `help blacklist' on $wiz_help).

COMMANDS FOR UNCONNECTED PLAYERS

Recall that for each line that an unconnected player types, the server parses that line into words (the same way normal commands are parsed into a list of words that is then assigned to `args') and then #0:do_login_command is called.

:parse_command (@args) => {verb, @args}

given the sequence of arguments that were fed to #0:do_login_command

this returns the name of a verb on $login to be called together with a

list of arguments to be passed to it.

By default this just returns args iff args[1] names an actual verb on $login that is +x and has args {"any","none","any"}. Otherwise, it returns one of

.blank_command -- verb to call if command line is empty

.bogus_command -- verb to call if command line otherwise unintelligible

In both cases :parse_command returns a verbname followed by the entire args list passed to it (including the would-be verb at the beginning if any).

Currently the following verbs are available to non-connected players

h*elp @h*elp -- print .welcome_message

? -- print a short list of available commands

w*ho @w*ho -- print a list of logged in players (excluding wizards)

co*nnect @co*nnect -- connect to an existing player

cr*eate @cr*eate -- create a new player

up*time @up*time -- tell how long the server has been running

version @version -- tell which version of the server is running

q*uit @q*uit -- logoff

Adding a new command is fairly straightforward; just create a verb on $login, making sure a previous verb doesn't already match the name you want to give it. Then give it args of "any" "none "any" and make sure it is +x. Such a verb should begin with `if (caller != #0) return E_PERM; ...' so as to prevent anyone other from a not-logged-in player from making use of it.

CUSTOMIZATIONS

.welcome_message

-- the message for "help" to print.

.create_enabled

== 0 => @create prints .registration_string if one tries to use it

== 1 => anyone from a non-blacklisted site (see `help blacklist')

may use @create to make a new player

.registration_address

-- an email address for character creation requests

.registration_string

-- string to print to players to give them information about how to get

a character created for them, .registration_address is substituted

for %e, % for %%

.newt_registration_string

-- string to print to @newted players (see `help @newt').

same substitutions as for .registration_string.

.max_connections

-- integer representing the maximum connected players permitted on this moo.

.connection_limit_msg

-- string printed out when this is reached.

.lag_exemptions

-- list of non-wizard players who may login anyway.

Other verbs

:registration_string() => .registration_string with substitutions

:newt_registration_string() => .newt_registration_string with substitutions

:player_creation_enabled(connection)

decides whether someone on connection should be allowed to create

a player. If you decide this shouldn't depend strictly on the blacklist

and on the value of .create_enabled, here's where the extra code can go.

:check_for_shutdown()

prints a warning message to append to the login banner in the event

that the server will be going down soon.

:check_player_db()

prints a warning message to append to the login banner in the event

that $player_db is being reloaded to warn players that their character

names might not be recognized.

SITE LOCKS

see `help blacklist'