evennia.contrib.base_systems.mux_comms_cmds.mux_comms_cmds¶
Legacy Comms-commands
Griatch 2021
In Evennia 1.0, the old Channel commands (originally inspired by MUX) were replaced by the single channel command that performs all these function. That command is still required to talk on channels. This contrib (extracted from Evennia 0.9.5) reuses the channel-management of the base Channel command but breaks out its functionality into separate Commands with MUX-familiar names.
allcom - channel/all and channel
addcom - channel/alias, channel/sub and channel/unmute
delcom - channel/unalias, alias/unsub and channel/mute
cboot - channel/boot (channel/ban and /unban not supported)
cwho - channel/who
ccreate - channel/create
cdestroy - channel/destroy
clock - channel/lock
cdesc - channel/desc
Installation:
Import the CmdSetLegacyComms cmdset from this module into mygame/commands/default_cmdsets.py
Add it to the CharacterCmdSet’s at_cmdset_creation method.
Reload the server.
Example:
# in mygame/commands/default_cmdsets.py
# ..
from evennia.contrib.base_systems.mux_comms_cmds import CmdSetLegacyComms # <----
class CharacterCmdSet(default_cmds.CharacterCmdSet):
# ...
def at_cmdset_creation(self):
# ...
self.add(CmdSetLegacyComms) # <----
- class evennia.contrib.base_systems.mux_comms_cmds.mux_comms_cmds.CmdAddCom(**kwargs)[source]¶
Bases:
CmdChannelAdd a channel alias and/or subscribe to a channel
- Usage:
addcom [alias=] <channel>
Joins a given channel. If alias is given, this will allow you to refer to the channel by this alias rather than the full channel name. Subsequent calls of this command can be used to add multiple aliases to an already joined channel.
- key = 'addcom'¶
- aliases = ['aliaschan', 'chanalias']¶
- help_category = 'comms'¶
- locks = 'cmd:not pperm(channel_banned)'¶
- account_caller = True¶
- lock_storage = 'cmd:not pperm(channel_banned)'¶
- search_index_entry = {'aliases': 'aliaschan chanalias', 'category': 'comms', 'key': 'addcom', 'no_prefix': ' aliaschan chanalias', 'tags': '', 'text': '\nAdd a channel alias and/or subscribe to a channel\n\nUsage:\n addcom [alias=] <channel>\n\nJoins a given channel. If alias is given, this will allow you to\nrefer to the channel by this alias rather than the full channel\nname. Subsequent calls of this command can be used to add multiple\naliases to an already joined channel.\n'}¶
- class evennia.contrib.base_systems.mux_comms_cmds.mux_comms_cmds.CmdDelCom(**kwargs)[source]¶
Bases:
CmdChannelremove a channel alias and/or unsubscribe from channel
- Usage:
delcom <alias or channel> delcom/all <channel>
If the full channel name is given, unsubscribe from the channel. If an alias is given, remove the alias but don’t unsubscribe. If the ‘all’ switch is used, remove all aliases for that channel.
- key = 'delcom'¶
- aliases = ['delaliaschan', 'delchanalias']¶
- help_category = 'comms'¶
- locks = 'cmd:not perm(channel_banned)'¶
- account_caller = True¶
- lock_storage = 'cmd:not perm(channel_banned)'¶
- search_index_entry = {'aliases': 'delaliaschan delchanalias', 'category': 'comms', 'key': 'delcom', 'no_prefix': ' delaliaschan delchanalias', 'tags': '', 'text': "\nremove a channel alias and/or unsubscribe from channel\n\nUsage:\n delcom <alias or channel>\n delcom/all <channel>\n\nIf the full channel name is given, unsubscribe from the\nchannel. If an alias is given, remove the alias but don't\nunsubscribe. If the 'all' switch is used, remove all aliases\nfor that channel.\n"}¶
- class evennia.contrib.base_systems.mux_comms_cmds.mux_comms_cmds.CmdAllCom(**kwargs)[source]¶
Bases:
CmdChannelperform admin operations on all channels
- Usage:
allcom [on | off | who | destroy]
Allows the user to universally turn off or on all channels they are on, as well as perform a ‘who’ for all channels they are on. Destroy deletes all channels that you control.
Without argument, works like comlist.
- key = 'allcom'¶
- aliases = []¶
- locks = 'cmd:all();cmd: not pperm(channel_banned)'¶
- help_category = 'comms'¶
- account_caller = True¶
- lock_storage = 'cmd:all();cmd: not pperm(channel_banned)'¶
- search_index_entry = {'aliases': '', 'category': 'comms', 'key': 'allcom', 'no_prefix': ' ', 'tags': '', 'text': "\nperform admin operations on all channels\n\nUsage:\n allcom [on | off | who | destroy]\n\nAllows the user to universally turn off or on all channels they are on, as\nwell as perform a 'who' for all channels they are on. Destroy deletes all\nchannels that you control.\n\nWithout argument, works like comlist.\n"}¶
- class evennia.contrib.base_systems.mux_comms_cmds.mux_comms_cmds.CmdCdestroy(**kwargs)[source]¶
Bases:
CmdChanneldestroy a channel you created
- Usage:
cdestroy <channel>
Destroys a channel that you control.
- key = 'cdestroy'¶
- aliases = []¶
- help_category = 'comms'¶
- locks = 'cmd:all();cmd: not pperm(channel_banned)'¶
- account_caller = True¶
- lock_storage = 'cmd:all();cmd: not pperm(channel_banned)'¶
- search_index_entry = {'aliases': '', 'category': 'comms', 'key': 'cdestroy', 'no_prefix': ' ', 'tags': '', 'text': '\ndestroy a channel you created\n\nUsage:\n cdestroy <channel>\n\nDestroys a channel that you control.\n'}¶
- class evennia.contrib.base_systems.mux_comms_cmds.mux_comms_cmds.CmdCBoot(**kwargs)[source]¶
Bases:
CmdChannelkick an account from a channel you control
- Usage:
cboot[/quiet] <channel> = <account> [:reason]
- Switch:
quiet - don’t notify the channel
Kicks an account or object from a channel you control.
- key = 'cboot'¶
- aliases = []¶
- switch_options = ('quiet',)¶
- locks = 'cmd:all();cmd: not pperm(channel_banned)'¶
- help_category = 'comms'¶
- account_caller = True¶
- lock_storage = 'cmd:all();cmd: not pperm(channel_banned)'¶
- search_index_entry = {'aliases': '', 'category': 'comms', 'key': 'cboot', 'no_prefix': ' ', 'tags': '', 'text': "\nkick an account from a channel you control\n\nUsage:\n cboot[/quiet] <channel> = <account> [:reason]\n\nSwitch:\n quiet - don't notify the channel\n\nKicks an account or object from a channel you control.\n\n"}¶
- class evennia.contrib.base_systems.mux_comms_cmds.mux_comms_cmds.CmdCWho(**kwargs)[source]¶
Bases:
CmdChannelshow who is listening to a channel
- Usage:
cwho <channel>
List who is connected to a given channel you have access to.
- key = 'cwho'¶
- aliases = []¶
- locks = 'cmd:all();cmd: not pperm(channel_banned)'¶
- help_category = 'comms'¶
- account_caller = True¶
- lock_storage = 'cmd:all();cmd: not pperm(channel_banned)'¶
- search_index_entry = {'aliases': '', 'category': 'comms', 'key': 'cwho', 'no_prefix': ' ', 'tags': '', 'text': '\nshow who is listening to a channel\n\nUsage:\n cwho <channel>\n\nList who is connected to a given channel you have access to.\n'}¶
- class evennia.contrib.base_systems.mux_comms_cmds.mux_comms_cmds.CmdChannelCreate(**kwargs)[source]¶
Bases:
CmdChannelcreate a new channel
- Usage:
ccreate <new channel>[;alias;alias…] = description
Creates a new channel owned by you.
- key = 'ccreate'¶
- aliases = ['channelcreate']¶
- locks = 'cmd:not pperm(channel_banned) and pperm(Player)'¶
- help_category = 'comms'¶
- account_caller = True¶
- lock_storage = 'cmd:not pperm(channel_banned) and pperm(Player)'¶
- search_index_entry = {'aliases': 'channelcreate', 'category': 'comms', 'key': 'ccreate', 'no_prefix': ' channelcreate', 'tags': '', 'text': '\ncreate a new channel\n\nUsage:\n ccreate <new channel>[;alias;alias...] = description\n\nCreates a new channel owned by you.\n'}¶
- class evennia.contrib.base_systems.mux_comms_cmds.mux_comms_cmds.CmdClock(**kwargs)[source]¶
Bases:
CmdChannelchange channel locks of a channel you control
- Usage:
clock <channel> [= <lockstring>]
Changes the lock access restrictions of a channel. If no lockstring was given, view the current lock definitions.
- key = 'clock'¶
- aliases = []¶
- locks = 'cmd:not pperm(channel_banned) and perm(Admin)'¶
- help_category = 'comms'¶
- account_caller = True¶
- lock_storage = 'cmd:not pperm(channel_banned) and perm(Admin)'¶
- search_index_entry = {'aliases': '', 'category': 'comms', 'key': 'clock', 'no_prefix': ' ', 'tags': '', 'text': '\nchange channel locks of a channel you control\n\nUsage:\n clock <channel> [= <lockstring>]\n\nChanges the lock access restrictions of a channel. If no\nlockstring was given, view the current lock definitions.\n'}¶
- class evennia.contrib.base_systems.mux_comms_cmds.mux_comms_cmds.CmdCdesc(**kwargs)[source]¶
Bases:
CmdChanneldescribe a channel you control
- Usage:
cdesc <channel> = <description>
Changes the description of the channel as shown in channel lists.
- key = 'cdesc'¶
- aliases = []¶
- locks = 'cmd:not pperm(channel_banned)'¶
- help_category = 'comms'¶
- account_caller = True¶
- lock_storage = 'cmd:not pperm(channel_banned)'¶
- search_index_entry = {'aliases': '', 'category': 'comms', 'key': 'cdesc', 'no_prefix': ' ', 'tags': '', 'text': '\ndescribe a channel you control\n\nUsage:\n cdesc <channel> = <description>\n\nChanges the description of the channel as shown in\nchannel lists.\n\n'}¶