mudsys
index
(built-in)

The mudsys module, for all MUD system utils.

 
Functions
       
account_creating(...)
account_creating(name)
 
returns whether an account with the name is creating.
account_exists(...)
account_exists(name)
 
Returns whether an account with the name exists.
add_acct_method(...)
add_acct_method(name, method)
 
Adds a function or property to the Account class.
add_char_method(...)
Same as add_acct_method for characters.
add_cmd(...)
add_cmd(name, shorthand, cmd_func, user_group, interrupts_action)
 
Add a new command to the master command table. If a preferred shorthand
exists, e.g., 'n' for 'north', it can be specified. Otherwise, shorthand
should be None. Command functions take three arguments: a character
issuing the command, the command name, and a string argument supplied
to the command. Commands must be tied to a specific user group, and they
can optionally interupt character actions.
add_cmd_check(...)
add_cmd_check(name, check_func)
 
Add a new command check to a registered command. Check functions take
two arguments: the character issuing the command, and the command name.
If a check fails, it should return False and send the character a
message why.
add_exit_method(...)
Same as add_acct_method for exits.
add_help(...)
add_help(keywords, info, user_groups='', related='')
 
Add a new, non-persistent helpfile to the mud's help database.
add_obj_method(...)
Same as add_acct_method for objects.
add_room_method(...)
Same as add_acct_method for rooms.
add_sock_method(...)
Same as add_acct_method for sockets.
add_worn_type(...)
add_worn_type(type, postypes)
 
Register a new type of worn item. Postypes is a comma-separated list of
body position types this object must be equipped to e.g., 
shirt : torso, arm, arm.
attach_account_socket(...)
attach_account_socket(acct, sock)
 
Link a loaded account to a connected socket.
attach_char_socket(...)
attach_char_socket(ch, sock)
 
Link a loaded character to a connected socket.
can_edit_zone(...)
can_edit_zone(ch, zone)
 
True or False if a character has permission to edit a zone.
create_account(...)
create_account(acctname)
 
Returns a new account by the specified name, or None if an account by.
the specified name is already registered or creating. After the accountgeneration process is complete, mudsys.do_register(acct) must be called.
create_bit(...)
create_bit(bitvector, bit)
 
Creates a new bit on the specified bitvector.
create_bitvector(...)
Not yet implemented.
create_player(...)
Same as mudsys.create_account for player characters.
detach_char_socket(...)
detach_char_socket(ch)
 
Unlink a character from its attached socket.
do_copyover(...)
do_copyover()
 
performs a copyover on the mud.
do_disconnect(...)
do_disconnect(ch)
 
call detach_char_socket, then close the socket.
do_quit(...)
do_quit(ch)
 
Extract a character from game.
do_register(...)
do_register(char_or_account)
 
Register a PC or account for the first time. Should be called after creation.
do_save(...)
do_save(char_account_or_zone)
 
Save a character, account's or zone information.
do_shutdown(...)
do_shutdown()
 
shuts the mud down.
get_help(...)
get_help(keyword)
 
Returns a tuple of a helpfile's keywords, info, user_groups, and related
or None if the helpfile does not exist.
get_player(...)
get_player(name)
 
Return a saved character of specified name, or None.
handle_cmd_input(...)
handle_cmd_input(sock, cmd)
 
Equivalent to char.Char.act(cmd)
item_add_type(...)
item_add_type(name, type_data)
 
Register a new item type and its data.
list_help(...)
list_help(keyword='')
 
Returns a list of helpfiles that match the specified keyword. If no
keywordi s supplied, return all helpfiles.
list_zone_contents(...)
list_zone_contents(zone, type)
 
Returns a list of the content keys of the given type, for the specified
zone.
load_account(...)
load_account(name)
 
Return a saved account of specified name, or None.
load_char(...)
Alias for mudsys.get_player(name).
next_uid(...)
next_uid()
 
Returns the next available universal identification number.
password_matches(...)
password_matches(acct, psswd)
 
Returns True or False if the given password matches the account's password.
player_creating(...)
player_creating(name)
 
returns whether a player with the name is creating.
player_exists(...)
player_exists(name)
 
Returns whether a player with the name exists.
register_char_cansee(...)
register_char_cansee(check_function(observer, observee))
 
Register a new check of whether one character can see another.
register_dflt_move_cmd(...)
register_dflt_move_cmd(cmdname)
 
registers a new default movement command, e.g., north
register_exit_cansee(...)
Same as register_char_cansee for exits.
register_move_check(...)
register_move_check(check_func)
 
Register a check to perform movement commands. See mudsys.add_cmd_check
for information about command checks.
register_obj_cansee(...)
Same as register_char_cansee for objects.
remove_cmd(...)
remove_cmd(name)
 
Removes a command from the master command table.
set_cmd_move(...)
set_cmd_move(cmd_func)
 
Register a player command for handling all default movement commands.
See mudsys.add_cmd for information about commands.
set_password(...)
set_password(acct, passwd)
 
Set an account's password.
sys_getval(...)
sys_getval(name)
 
returns a value registered in the system settings.
sys_getvar(...)
Alias to mudsys.sys_getval
sys_setval(...)
set_sysval(name, val)
 
sets a value registered in the system settings.
sys_setvar(...)
Alias to mudsys.sys_setval
try_enter_game(...)
try_enter_game(ch)
 
Tries to add a character the game world.
world_add_type(...)
world_add_type(typename, class_data)
 
Registers a new type to the world database. Like, e.g., mob, obj, and
room prototypes. Assumes class has a store and setKey method. Init
method should take one optional argument: a storage set to parse the
type data from, when loaded.
world_get_type(...)
world_get_type(typename, key)
 
Returns registered entry of the specified type from the world database.
Assumes it is a python type, and not a C type. If no type exists
return None.
world_put_type(...)
world_put_type(typename, key, data)
 
Put and save an entry of the specified type to the world database.
world_remove_type(...)
world_remove_type(typename, key)
 
Remove and return an entry from the world database, or None.
world_save_type(...)
world_save_type(typename, key)
 
Saves an entry in the world database if it exists.