# 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)

  Bases: `evennia.commands.default.comms.CmdChannel`

  Add 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
  `func`()

    Implement the command

  `lock_storage` = 'cmd:not pperm(channel_banned)'
  `search_index_entry` = {'aliases': 'aliaschan chanalias', 'category': 'comms', 'key': 'addcom', 'no_prefix': ' aliaschan chanalias', 'tags': '', 'text': '\n Add a channel alias and/or subscribe to a channel\n\n Usage:\n addcom [alias=] <channel>\n\n Joins a given channel. If alias is given, this will allow you to\n refer to the channel by this alias rather than the full channel\n name. Subsequent calls of this command can be used to add multiple\n aliases to an already joined channel.\n '}

class `evennia.contrib.base_systems.mux_comms_cmds.mux_comms_cmds.``CmdDelCom`(**kwargs)

  Bases: `evennia.commands.default.comms.CmdChannel`

  remove 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
  `func`()

    Implementing the command.

  `lock_storage` = 'cmd:not perm(channel_banned)'
  `search_index_entry` = {'aliases': 'delaliaschan delchanalias', 'category': 'comms', 'key': 'delcom', 'no_prefix': ' delaliaschan delchanalias', 'tags': '', 'text': "\n remove a channel alias and/or unsubscribe from channel\n\n Usage:\n delcom <alias or channel>\n delcom/all <channel>\n\n If the full channel name is given, unsubscribe from the\n channel. If an alias is given, remove the alias but don't\n unsubscribe. If the 'all' switch is used, remove all aliases\n for that channel.\n "}

class `evennia.contrib.base_systems.mux_comms_cmds.mux_comms_cmds.``CmdAllCom`(**kwargs)

  Bases: `evennia.commands.default.comms.CmdChannel`

  perform 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: not pperm(channel_banned)'
  `help_category` = 'comms'
  `account_caller` = True
  `func`()

    Runs the function

  `lock_storage` = 'cmd: not pperm(channel_banned)'
  `search_index_entry` = {'aliases': '', 'category': 'comms', 'key': 'allcom', 'no_prefix': ' ', 'tags': '', 'text': "\n perform admin operations on all channels\n\n Usage:\n allcom [on | off | who | destroy]\n\n Allows the user to universally turn off or on all channels they are on, as\n well as perform a 'who' for all channels they are on. Destroy deletes all\n channels that you control.\n\n Without argument, works like comlist.\n "}

class `evennia.contrib.base_systems.mux_comms_cmds.mux_comms_cmds.``CmdCdestroy`(**kwargs)

  Bases: `evennia.commands.default.comms.CmdChannel`

  destroy a channel you created

  Usage:

    cdestroy <channel>

  Destroys a channel that you control.

  `key` = 'cdestroy'
  `aliases` = []
  `help_category` = 'comms'
  `locks` = 'cmd: not pperm(channel_banned)'
  `account_caller` = True
  `func`()

    Destroy objects cleanly.

  `lock_storage` = 'cmd: not pperm(channel_banned)'
  `search_index_entry` = {'aliases': '', 'category': 'comms', 'key': 'cdestroy', 'no_prefix': ' ', 'tags': '', 'text': '\n destroy a channel you created\n\n Usage:\n cdestroy <channel>\n\n Destroys a channel that you control.\n '}

class `evennia.contrib.base_systems.mux_comms_cmds.mux_comms_cmds.``CmdCBoot`(**kwargs)

  Bases: `evennia.commands.default.comms.CmdChannel`

  kick 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: not pperm(channel_banned)'
  `help_category` = 'comms'
  `account_caller` = True
  `func`()

    implement the function

  `lock_storage` = 'cmd: not pperm(channel_banned)'
  `search_index_entry` = {'aliases': '', 'category': 'comms', 'key': 'cboot', 'no_prefix': ' ', 'tags': '', 'text': "\n kick an account from a channel you control\n\n Usage:\n cboot[/quiet] <channel> = <account> [:reason]\n\n Switch:\n quiet - don't notify the channel\n\n Kicks an account or object from a channel you control.\n\n "}

class `evennia.contrib.base_systems.mux_comms_cmds.mux_comms_cmds.``CmdCWho`(**kwargs)

  Bases: `evennia.commands.default.comms.CmdChannel`

  show 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: not pperm(channel_banned)'
  `help_category` = 'comms'
  `account_caller` = True
  `func`()

    implement function

  `lock_storage` = 'cmd: not pperm(channel_banned)'
  `search_index_entry` = {'aliases': '', 'category': 'comms', 'key': 'cwho', 'no_prefix': ' ', 'tags': '', 'text': '\n show who is listening to a channel\n\n Usage:\n cwho <channel>\n\n List 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)

  Bases: `evennia.commands.default.comms.CmdChannel`

  create 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
  `func`()

    Implement the command

  `lock_storage` = 'cmd:not pperm(channel_banned) and pperm(Player)'
  `search_index_entry` = {'aliases': 'channelcreate', 'category': 'comms', 'key': 'ccreate', 'no_prefix': ' channelcreate', 'tags': '', 'text': '\n create a new channel\n\n Usage:\n ccreate <new channel>[;alias;alias...] = description\n\n Creates a new channel owned by you.\n '}

class `evennia.contrib.base_systems.mux_comms_cmds.mux_comms_cmds.``CmdClock`(**kwargs)

  Bases: `evennia.commands.default.comms.CmdChannel`

  change 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
  `func`()

    run the function

  `lock_storage` = 'cmd:not pperm(channel_banned) and perm(Admin)'
  `search_index_entry` = {'aliases': '', 'category': 'comms', 'key': 'clock', 'no_prefix': ' ', 'tags': '', 'text': '\n change channel locks of a channel you control\n\n Usage:\n clock <channel> [= <lockstring>]\n\n Changes the lock access restrictions of a channel. If no\n lockstring was given, view the current lock definitions.\n '}

class `evennia.contrib.base_systems.mux_comms_cmds.mux_comms_cmds.``CmdCdesc`(**kwargs)

  Bases: `evennia.commands.default.comms.CmdChannel`

  describe 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
  `func`()

    Implement command

  `lock_storage` = 'cmd:not pperm(channel_banned)'
  `search_index_entry` = {'aliases': '', 'category': 'comms', 'key': 'cdesc', 'no_prefix': ' ', 'tags': '', 'text': '\n describe a channel you control\n\n Usage:\n cdesc <channel> = <description>\n\n Changes the description of the channel as shown in\n channel lists.\n\n '}

class `evennia.contrib.base_systems.mux_comms_cmds.mux_comms_cmds.``CmdSetLegacyComms`(cmdsetobj=None, key=None)

  Bases: `evennia.commands.cmdset.CmdSet`

  `at_cmdset_createion`()
  `path` = 'evennia.contrib.base_systems.mux_comms_cmds.mux_comms_cmds.CmdSetLegacyComms'