evennia.commands.default.admin

Admin commands

class evennia.commands.default.admin.CmdBoot(**kwargs)[source]

Bases: evennia.commands.default.muxcommand.MuxCommand

kick an account from the server.

Usage

boot[/switches] <account obj> [: reason]

Switches:

quiet - Silently boot without informing account sid - boot by session id instead of name or dbref

Boot an account object from the server. If a reason is supplied it will be echoed to the user unless /quiet is set.

key = 'boot'
switch_options = ('quiet', 'sid')
locks = 'cmd:perm(boot) or perm(Admin)'
help_category = 'admin'
func()[source]

Implementing the function

aliases = []
lock_storage = 'cmd:perm(boot) or perm(Admin)'
search_index_entry = {'aliases': '', 'category': 'admin', 'key': 'boot', 'tags': '', 'text': '\n kick an account from the server.\n\n Usage\n boot[/switches] <account obj> [: reason]\n\n Switches:\n quiet - Silently boot without informing account\n sid - boot by session id instead of name or dbref\n\n Boot an account object from the server. If a reason is\n supplied it will be echoed to the user unless /quiet is set.\n '}
class evennia.commands.default.admin.CmdBan(**kwargs)[source]

Bases: evennia.commands.default.muxcommand.MuxCommand

ban an account from the server

Usage:

ban [<name or ip> [: reason]]

Without any arguments, shows numbered list of active bans.

This command bans a user from accessing the game. Supply an optional reason to be able to later remember why the ban was put in place.

It is often preferable to ban an account from the server than to delete an account with accounts/delete. If banned by name, that account account can no longer be logged into.

IP (Internet Protocol) address banning allows blocking all access from a specific address or subnet. Use an asterisk (*) as a wildcard.

Examples

ban thomas - ban account ‘thomas’ ban/ip 134.233.2.111 - ban specific ip address ban/ip 134.233.2.* - ban all in a subnet ban/ip 134.233.*.* - even wider ban

A single IP filter can be easy to circumvent by changing computers or requesting a new IP address. Setting a wide IP block filter with wildcards might be tempting, but remember that it may also accidentally block innocent users connecting from the same country or region.

key = 'ban'
aliases = ['bans']
locks = 'cmd:perm(ban) or perm(Developer)'
help_category = 'admin'
func()[source]

Bans are stored in a serverconf db object as a list of dictionaries:

[ (name, ip, ipregex, date, reason),

(name, ip, ipregex, date, reason),… ]

where name and ip are set by the user and are shown in lists. ipregex is a converted form of ip where the * is replaced by an appropriate regex pattern for fast matching. date is the time stamp the ban was instigated and ‘reason’ is any optional info given to the command. Unset values in each tuple is set to the empty string.

lock_storage = 'cmd:perm(ban) or perm(Developer)'
search_index_entry = {'aliases': 'bans', 'category': 'admin', 'key': 'ban', 'tags': '', 'text': "\n ban an account from the server\n\n Usage:\n ban [<name or ip> [: reason]]\n\n Without any arguments, shows numbered list of active bans.\n\n This command bans a user from accessing the game. Supply an optional\n reason to be able to later remember why the ban was put in place.\n\n It is often preferable to ban an account from the server than to\n delete an account with accounts/delete. If banned by name, that account\n account can no longer be logged into.\n\n IP (Internet Protocol) address banning allows blocking all access\n from a specific address or subnet. Use an asterisk (*) as a\n wildcard.\n\n Examples:\n ban thomas - ban account 'thomas'\n ban/ip 134.233.2.111 - ban specific ip address\n ban/ip 134.233.2.* - ban all in a subnet\n ban/ip 134.233.*.* - even wider ban\n\n A single IP filter can be easy to circumvent by changing computers\n or requesting a new IP address. Setting a wide IP block filter with\n wildcards might be tempting, but remember that it may also\n accidentally block innocent users connecting from the same country\n or region.\n\n "}
class evennia.commands.default.admin.CmdUnban(**kwargs)[source]

Bases: evennia.commands.default.muxcommand.MuxCommand

remove a ban from an account

Usage:

unban <banid>

This will clear an account name/ip ban previously set with the ban command. Use this command without an argument to view a numbered list of bans. Use the numbers in this list to select which one to unban.

key = 'unban'
locks = 'cmd:perm(unban) or perm(Developer)'
help_category = 'admin'
func()[source]

Implement unbanning

aliases = []
lock_storage = 'cmd:perm(unban) or perm(Developer)'
search_index_entry = {'aliases': '', 'category': 'admin', 'key': 'unban', 'tags': '', 'text': '\n remove a ban from an account\n\n Usage:\n unban <banid>\n\n This will clear an account name/ip ban previously set with the ban\n command. Use this command without an argument to view a numbered\n list of bans. Use the numbers in this list to select which one to\n unban.\n\n '}
class evennia.commands.default.admin.CmdEmit(**kwargs)[source]

Bases: evennia.commands.default.muxcommand.MuxCommand

admin command for emitting message to multiple objects

Usage:

emit[/switches] [<obj>, <obj>, … =] <message> remit [<obj>, <obj>, … =] <message> pemit [<obj>, <obj>, … =] <message>

Switches:

room - limit emits to rooms only (default) accounts - limit emits to accounts only contents - send to the contents of matched objects too

Emits a message to the selected objects or to your immediate surroundings. If the object is a room, send to its contents. remit and pemit are just limited forms of emit, for sending to rooms and to accounts respectively.

key = 'emit'
aliases = ['pemit', 'remit']
switch_options = ('room', 'accounts', 'contents')
locks = 'cmd:perm(emit) or perm(Builder)'
help_category = 'admin'
func()[source]

Implement the command

lock_storage = 'cmd:perm(emit) or perm(Builder)'
search_index_entry = {'aliases': 'pemit remit', 'category': 'admin', 'key': 'emit', 'tags': '', 'text': '\n admin command for emitting message to multiple objects\n\n Usage:\n emit[/switches] [<obj>, <obj>, ... =] <message>\n remit [<obj>, <obj>, ... =] <message>\n pemit [<obj>, <obj>, ... =] <message>\n\n Switches:\n room - limit emits to rooms only (default)\n accounts - limit emits to accounts only\n contents - send to the contents of matched objects too\n\n Emits a message to the selected objects or to\n your immediate surroundings. If the object is a room,\n send to its contents. remit and pemit are just\n limited forms of emit, for sending to rooms and\n to accounts respectively.\n '}
class evennia.commands.default.admin.CmdNewPassword(**kwargs)[source]

Bases: evennia.commands.default.muxcommand.MuxCommand

change the password of an account

Usage:

userpassword <user obj> = <new password>

Set an account’s password.

key = 'userpassword'
locks = 'cmd:perm(newpassword) or perm(Admin)'
help_category = 'admin'
func()[source]

Implement the function.

aliases = []
lock_storage = 'cmd:perm(newpassword) or perm(Admin)'
search_index_entry = {'aliases': '', 'category': 'admin', 'key': 'userpassword', 'tags': '', 'text': "\n change the password of an account\n\n Usage:\n userpassword <user obj> = <new password>\n\n Set an account's password.\n "}
class evennia.commands.default.admin.CmdPerm(**kwargs)[source]

Bases: evennia.commands.default.muxcommand.MuxCommand

set the permissions of an account/object

Usage:

perm[/switch] <object> [= <permission>[,<permission>,…]] perm[/switch] *<account> [= <permission>[,<permission>,…]]

Switches:

del - delete the given permission from <object> or <account>. account - set permission on an account (same as adding * to name)

This command sets/clears individual permission strings on an object or account. If no permission is given, list all permissions on <object>.

key = 'perm'
aliases = ['setperm']
switch_options = ('del', 'account')
locks = 'cmd:perm(perm) or perm(Developer)'
help_category = 'admin'
func()[source]

Implement function

lock_storage = 'cmd:perm(perm) or perm(Developer)'
search_index_entry = {'aliases': 'setperm', 'category': 'admin', 'key': 'perm', 'tags': '', 'text': '\n set the permissions of an account/object\n\n Usage:\n perm[/switch] <object> [= <permission>[,<permission>,...]]\n perm[/switch] *<account> [= <permission>[,<permission>,...]]\n\n Switches:\n del - delete the given permission from <object> or <account>.\n account - set permission on an account (same as adding * to name)\n\n This command sets/clears individual permission strings on an object\n or account. If no permission is given, list all permissions on <object>.\n '}
class evennia.commands.default.admin.CmdWall(**kwargs)[source]

Bases: evennia.commands.default.muxcommand.MuxCommand

make an announcement to all

Usage:

wall <message>

Announces a message to all connected sessions including all currently unlogged in.

key = 'wall'
locks = 'cmd:perm(wall) or perm(Admin)'
help_category = 'admin'
func()[source]

Implements command

aliases = []
lock_storage = 'cmd:perm(wall) or perm(Admin)'
search_index_entry = {'aliases': '', 'category': 'admin', 'key': 'wall', 'tags': '', 'text': '\n make an announcement to all\n\n Usage:\n wall <message>\n\n Announces a message to all connected sessions\n including all currently unlogged in.\n '}
class evennia.commands.default.admin.CmdForce(**kwargs)[source]

Bases: evennia.commands.default.muxcommand.MuxCommand

forces an object to execute a command

Usage:

force <object>=<command string>

Example

force bob=get stick

key = 'force'
locks = 'cmd:perm(spawn) or perm(Builder)'
help_category = 'building'
perm_used = 'edit'
func()[source]

Implements the force command

aliases = []
lock_storage = 'cmd:perm(spawn) or perm(Builder)'
search_index_entry = {'aliases': '', 'category': 'building', 'key': 'force', 'tags': '', 'text': '\n forces an object to execute a command\n\n Usage:\n force <object>=<command string>\n\n Example:\n force bob=get stick\n '}