evennia.commands.default.comms

Communication commands:

  • channel

  • page

  • irc/rss/grapevine/discord linking

class evennia.commands.default.comms.CmdChannel(**kwargs)[source]

Bases: evennia.commands.default.muxcommand.MuxCommand

Use and manage in-game channels.

Usage:

channel channelname <msg> channel channel name = <msg> channel (show all subscription) channel/all (show available channels) channel/alias channelname = alias[;alias…] channel/unalias alias channel/who channelname channel/history channelname [= index] channel/sub channelname [= alias[;alias…]] channel/unsub channelname[,channelname, …] channel/mute channelname[,channelname,…] channel/unmute channelname[,channelname,…]

channel/create channelname[;alias;alias[:typeclass]] [= description] channel/destroy channelname [= reason] channel/desc channelname = description channel/lock channelname = lockstring channel/unlock channelname = lockstring channel/ban channelname (list bans) channel/ban[/quiet] channelname[, channelname, …] = subscribername [: reason] channel/unban[/quiet] channelname[, channelname, …] = subscribername channel/boot[/quiet] channelname[,channelname,…] = subscribername [: reason]

Usage: channel channelname msg

channel channel name = msg (with space in channel name)

This sends a message to the channel. Note that you will rarely use this command like this; instead you can use the alias

channelname <msg> channelalias <msg>

For example

public Hello World pub Hello World

(this shortcut doesn’t work for aliases containing spaces)

See channel/alias for help on setting channel aliases.

Usage: channel/alias channel = alias[;alias[;alias…]]

channel/unalias alias channel - this will list your subs and aliases to each channel

Set one or more personal aliases for referencing a channel. For example:

channel/alias warrior’s guild = warrior;wguild;warchannel;warrior guild

You can now send to the channel using all of these:

warrior’s guild Hello warrior Hello wguild Hello warchannel Hello

Note that this will not work if the alias has a space in it. So the ‘warrior guild’ alias must be used with the channel command:

channel warrior guild = Hello

Channel-aliases can be removed one at a time, using the ‘/unalias’ switch.

Usage: channel/who channelname

List the channel’s subscribers. Shows who are currently offline or are muting the channel. Subscribers who are ‘muting’ will not see messages sent to the channel (use channel/mute to mute a channel).

Usage: channel/history channel [= index]

This will display the last |c20|n lines of channel history. By supplying an index number, you will step that many lines back before viewing those 20 lines.

For example:

channel/history public = 35

will go back 35 lines and show the previous 20 lines from that point (so lines -35 to -55).

Usage: channel/sub channel [=alias[;alias;…]]

channel/unsub channel

This subscribes you to a channel and optionally assigns personal shortcuts for you to use to send to that channel (see aliases). When you unsub, all your personal aliases will also be removed.

Usage: channel/mute channelname

channel/unmute channelname

Muting silences all output from the channel without actually un-subscribing. Other channel members will see that you are muted in the /who list. Sending a message to the channel will automatically unmute you.

Usage: channel/create channelname[;alias;alias[:typeclass]] [= description]

channel/destroy channelname [= reason]

Creates a new channel (or destroys one you control). You will automatically join the channel you create and everyone will be kicked and loose all aliases to a destroyed channel.

Usage: channel/lock channelname = lockstring

channel/unlock channelname = lockstring

Note: this is an admin command.

A lockstring is on the form locktype:lockfunc(). Channels understand three locktypes:

listen - who may listen or join the channel. send - who may send messages to the channel control - who controls the channel. This is usually the one creating

the channel.

Common lockfuncs are all() and perm(). To make a channel everyone can listen to but only builders can talk on, use this:

listen:all() send: perm(Builders)

Usage:

channel/boot[/quiet] channelname[,channelname,…] = subscribername [: reason] channel/ban channelname[, channelname, …] = subscribername [: reason] channel/unban channelname[, channelname, …] = subscribername channel/unban channelname channel/ban channelname (list bans)

Booting will kick a named subscriber from channel(s) temporarily. The ‘reason’ will be passed to the booted user. Unless the /quiet switch is used, the channel will also be informed of the action. A booted user is still able to re-connect, but they’ll have to set up their aliases again.

Banning will blacklist a user from (re)joining the provided channels. It will then proceed to boot them from those channels if they were connected. The ‘reason’ and /quiet works the same as for booting.

Example

boot mychannel1 = EvilUser : Kicking you to cool down a bit. ban mychannel1,mychannel2= EvilUser : Was banned for spamming.

key = '@channel'
aliases = ['@channels', '@chan']
help_category = 'comms'
locks = 'cmd:not pperm(channel_banned);admin:all();manage:all();changelocks:perm(Admin)'
switch_options = ('list', 'all', 'history', 'sub', 'unsub', 'mute', 'unmute', 'alias', 'unalias', 'create', 'destroy', 'desc', 'lock', 'unlock', 'boot', 'ban', 'unban', 'who')
account_caller = True
search_channel(channelname, exact=False, handle_errors=True)[source]

Helper function for searching for a single channel with some error handling.

Parameters
  • channelname (str) – Name, alias #dbref or partial name/alias to search for.

  • exact (bool, optional) – If an exact or fuzzy-match of the name should be done. Note that even for a fuzzy match, an exactly given, unique channel name will always be returned.

  • handle_errors (bool) – If true, use self.msg to report errors if there are non/multiple matches. If so, the return will always be a single match or None.

Returns

object, list or None

If handle_errors is True, this is either a found Channel

or None. Otherwise it’s a list of zero, one or more channels found.

Notes

The ‘listen’ and ‘control’ accesses are checked before returning.

msg_channel(channel, message, **kwargs)[source]

Send a message to a given channel. This will check the ‘send’ permission on the channel.

Parameters
  • channel (Channel) – The channel to send to.

  • message (str) – The message to send.

  • **kwargs – Unused by default. These kwargs will be passed into all channel messaging hooks for custom overriding.

get_channel_history(channel, start_index=0)[source]

View a channel’s history.

Parameters
  • channel (Channel) – The channel to access.

  • message (str) – The message to send.

  • **kwargs – Unused by default. These kwargs will be passed into all channel messaging hooks for custom overriding.

sub_to_channel(channel)[source]

Subscribe to a channel. Note that all permissions should be checked before this step.

Parameters

channel (Channel) – The channel to access.

Returns

bool, str

True, None if connection failed. If False,

the second part is an error string.

unsub_from_channel(channel, **kwargs)[source]

Un-Subscribe to a channel. Note that all permissions should be checked before this step.

Parameters
  • channel (Channel) – The channel to unsub from.

  • **kwargs – Passed on to nick removal.

Returns

bool, str

True, None if un-connection succeeded. If False,

the second part is an error string.

add_alias(channel, alias, **kwargs)[source]

Add a new alias (nick) for the user to use with this channel.

Parameters
  • channel (Channel) – The channel to alias.

  • alias (str) – The personal alias to use for this channel.

  • **kwargs – If given, passed into nicks.add.

Note

We add two nicks - one is a plain alias -> channel.key that we need to be able to reference this channel easily. The other is a templated nick to easily be able to send messages to the channel without needing to give the full channel command. The structure of this nick is given by self.channel_msg_pattern and self.channel_msg_nick_replacement. By default it maps alias <msg> -> channel <channelname> = <msg>, so that you can for example just write pub Hello to send a message.

The alias created is alias $1 -> channel channel = $1, to allow for sending to channel using the main channel command.

remove_alias(alias, **kwargs)[source]

Remove an alias from a channel.

Parameters

alias (str, optional) – The alias to remove. The channel will be reverse-determined from the alias, if it exists.

Returns

bool, str

True, None if removal succeeded. If False,

the second part is an error string.

**kwargs: If given, passed into nicks.get/add.

Note

This will remove two nicks - the plain channel alias and the templated nick used for easily sending messages to the channel.

get_channel_aliases(channel)[source]

Get a user’s aliases for a given channel. The user is retrieved through self.caller.

Parameters

channel (Channel) – The channel to act on.

Returns

list – A list of zero, one or more alias-strings.

mute_channel(channel)[source]

Temporarily mute a channel.

Parameters

channel (Channel) – The channel to alias.

Returns

bool, str

True, None if muting successful. If False,

the second part is an error string.

unmute_channel(channel)[source]

Unmute a channel.

Parameters

channel (Channel) – The channel to alias.

Returns

bool, str

True, None if unmuting successful. If False,

the second part is an error string.

create_channel(name, description, typeclass=None, aliases=None)[source]

Create a new channel. Its name must not previously exist (case agnostic) (users can alias as needed). Will also connect to the new channel.

Parameters
  • name (str) – The new channel name/key.

  • description (str) – This is used in listings.

  • aliases (list) – A list of strings - alternative aliases for the channel (not to be confused with per-user aliases; these are available for everyone).

Returns

channel, str

new_channel, “” if creation successful. If False,

the second part is an error string.

destroy_channel(channel, message=None)[source]

Destroy an existing channel. Access should be checked before calling this function.

Parameters
  • channel (Channel) – The channel to alias.

  • message (str, optional) – Final message to send onto the channel before destroying it. If not given, a default message is used. Set to the empty string for no message.

if typeclass:

pass

set_lock(channel, lockstring)[source]

Set a lockstring on a channel. Permissions must have been checked before this call.

Parameters
  • channel (Channel) – The channel to operate on.

  • lockstring (str) – A lockstring on the form ‘type:lockfunc();…’

Returns

bool, str

True, None if setting lock was successful. If False,

the second part is an error string.

unset_lock(channel, lockstring)[source]

Remove locks in a lockstring on a channel. Permissions must have been checked before this call.

Parameters
  • channel (Channel) – The channel to operate on.

  • lockstring (str) – A lockstring on the form ‘type:lockfunc();…’

Returns

bool, str

True, None if setting lock was successful. If False,

the second part is an error string.

set_desc(channel, description)[source]

Set a channel description. This is shown in listings etc.

Parameters
  • caller (Object or Account) – The entity performing the action.

  • channel (Channel) – The channel to operate on.

  • description (str) – A short description of the channel.

Returns

bool, str

True, None if setting lock was successful. If False,

the second part is an error string.

boot_user(channel, target, quiet=False, reason='')[source]

Boot a user from a channel, with optional reason. This will also remove all their aliases for this channel.

Parameters
  • channel (Channel) – The channel to operate on.

  • target (Object or Account) – The entity to boot.

  • quiet (bool, optional) – Whether or not to announce to channel.

  • reason (str, optional) – A reason for the boot.

Returns

bool, str

True, None if setting lock was successful. If False,

the second part is an error string.

ban_user(channel, target, quiet=False, reason='')[source]

Ban a user from a channel, by locking them out. This will also boot them, if they are currently connected.

Parameters
  • channel (Channel) – The channel to operate on.

  • target (Object or Account) – The entity to ban

  • quiet (bool, optional) – Whether or not to announce to channel.

  • reason (str, optional) – A reason for the ban

Returns

bool, str

True, None if banning was successful. If False,

the second part is an error string.

unban_user(channel, target)[source]

Un-Ban a user from a channel. This will not reconnect them to the channel, just allow them to connect again (assuming they have the suitable ‘listen’ lock like everyone else).

Parameters
  • channel (Channel) – The channel to operate on.

  • target (Object or Account) – The entity to unban

Returns

bool, str

True, None if unbanning was successful. If False,

the second part is an error string.

channel_list_bans(channel)[source]

Show a channel’s bans.

Parameters

channel (Channel) – The channel to operate on.

Returns

list – A list of strings, each the name of a banned user.

channel_list_who(channel)[source]

Show a list of online people is subscribing to a channel. This will check the ‘control’ permission of caller to determine if only online users should be returned or everyone.

Parameters

channel (Channel) – The channel to operate on.

Returns

list

A list of prepared strings, with name + markers for if they are

muted or offline.

list_channels(channelcls=<class 'evennia.comms.comms.DefaultChannel'>)[source]

Return a available channels.

Parameters

channelcls (Channel, optional) – The channel-class to query on. Defaults to the default channel class from settings.

Returns

tuple

A tuple (subbed_chans, available_chans) with the channels

currently subscribed to, and those we have ‘listen’ access to but don’t actually sub to yet.

display_subbed_channels(subscribed)[source]

Display channels subscribed to.

Parameters

subscribed (list) – List of subscribed channels

Returns

EvTable – Table to display.

display_all_channels(subscribed, available)[source]

Display all available channels

Parameters

subscribed (list) – List of subscribed channels

Returns

EvTable – Table to display.

func()[source]

Main functionality of command.

lock_storage = 'cmd:not pperm(channel_banned);admin:all();manage:all();changelocks:perm(Admin)'
search_index_entry = {'aliases': '@channels @chan', 'category': 'comms', 'key': '@channel', 'no_prefix': 'channel channels chan', 'tags': '', 'text': "\n Use and manage in-game channels.\n\n Usage:\n channel channelname <msg>\n channel channel name = <msg>\n channel (show all subscription)\n channel/all (show available channels)\n channel/alias channelname = alias[;alias...]\n channel/unalias alias\n channel/who channelname\n channel/history channelname [= index]\n channel/sub channelname [= alias[;alias...]]\n channel/unsub channelname[,channelname, ...]\n channel/mute channelname[,channelname,...]\n channel/unmute channelname[,channelname,...]\n\n channel/create channelname[;alias;alias[:typeclass]] [= description]\n channel/destroy channelname [= reason]\n channel/desc channelname = description\n channel/lock channelname = lockstring\n channel/unlock channelname = lockstring\n channel/ban channelname (list bans)\n channel/ban[/quiet] channelname[, channelname, ...] = subscribername [: reason]\n channel/unban[/quiet] channelname[, channelname, ...] = subscribername\n channel/boot[/quiet] channelname[,channelname,...] = subscribername [: reason]\n\n # subtopics\n\n ## sending\n\n Usage: channel channelname msg\n channel channel name = msg (with space in channel name)\n\n This sends a message to the channel. Note that you will rarely use this\n command like this; instead you can use the alias\n\n channelname <msg>\n channelalias <msg>\n\n For example\n\n public Hello World\n pub Hello World\n\n (this shortcut doesn't work for aliases containing spaces)\n\n See channel/alias for help on setting channel aliases.\n\n ## alias and unalias\n\n Usage: channel/alias channel = alias[;alias[;alias...]]\n channel/unalias alias\n channel - this will list your subs and aliases to each channel\n\n Set one or more personal aliases for referencing a channel. For example:\n\n channel/alias warrior's guild = warrior;wguild;warchannel;warrior guild\n\n You can now send to the channel using all of these:\n\n warrior's guild Hello\n warrior Hello\n wguild Hello\n warchannel Hello\n\n Note that this will not work if the alias has a space in it. So the\n 'warrior guild' alias must be used with the `channel` command:\n\n channel warrior guild = Hello\n\n Channel-aliases can be removed one at a time, using the '/unalias' switch.\n\n ## who\n\n Usage: channel/who channelname\n\n List the channel's subscribers. Shows who are currently offline or are\n muting the channel. Subscribers who are 'muting' will not see messages sent\n to the channel (use channel/mute to mute a channel).\n\n ## history\n\n Usage: channel/history channel [= index]\n\n This will display the last |c20|n lines of channel history. By supplying an\n index number, you will step that many lines back before viewing those 20 lines.\n\n For example:\n\n channel/history public = 35\n\n will go back 35 lines and show the previous 20 lines from that point (so\n lines -35 to -55).\n\n ## sub and unsub\n\n Usage: channel/sub channel [=alias[;alias;...]]\n channel/unsub channel\n\n This subscribes you to a channel and optionally assigns personal shortcuts\n for you to use to send to that channel (see aliases). When you unsub, all\n your personal aliases will also be removed.\n\n ## mute and unmute\n\n Usage: channel/mute channelname\n channel/unmute channelname\n\n Muting silences all output from the channel without actually\n un-subscribing. Other channel members will see that you are muted in the /who\n list. Sending a message to the channel will automatically unmute you.\n\n ## create and destroy\n\n Usage: channel/create channelname[;alias;alias[:typeclass]] [= description]\n channel/destroy channelname [= reason]\n\n Creates a new channel (or destroys one you control). You will automatically\n join the channel you create and everyone will be kicked and loose all aliases\n to a destroyed channel.\n\n ## lock and unlock\n\n Usage: channel/lock channelname = lockstring\n channel/unlock channelname = lockstring\n\n Note: this is an admin command.\n\n A lockstring is on the form locktype:lockfunc(). Channels understand three\n locktypes:\n listen - who may listen or join the channel.\n send - who may send messages to the channel\n control - who controls the channel. This is usually the one creating\n the channel.\n\n Common lockfuncs are all() and perm(). To make a channel everyone can\n listen to but only builders can talk on, use this:\n\n listen:all()\n send: perm(Builders)\n\n ## boot and ban\n\n Usage:\n channel/boot[/quiet] channelname[,channelname,...] = subscribername [: reason]\n channel/ban channelname[, channelname, ...] = subscribername [: reason]\n channel/unban channelname[, channelname, ...] = subscribername\n channel/unban channelname\n channel/ban channelname (list bans)\n\n Booting will kick a named subscriber from channel(s) temporarily. The\n 'reason' will be passed to the booted user. Unless the /quiet switch is\n used, the channel will also be informed of the action. A booted user is\n still able to re-connect, but they'll have to set up their aliases again.\n\n Banning will blacklist a user from (re)joining the provided channels. It\n will then proceed to boot them from those channels if they were connected.\n The 'reason' and `/quiet` works the same as for booting.\n\n Example:\n boot mychannel1 = EvilUser : Kicking you to cool down a bit.\n ban mychannel1,mychannel2= EvilUser : Was banned for spamming.\n\n "}
class evennia.commands.default.comms.CmdObjectChannel(**kwargs)[source]

Bases: evennia.commands.default.comms.CmdChannel

Use and manage in-game channels.

Usage:

channel channelname <msg> channel channel name = <msg> channel (show all subscription) channel/all (show available channels) channel/alias channelname = alias[;alias…] channel/unalias alias channel/who channelname channel/history channelname [= index] channel/sub channelname [= alias[;alias…]] channel/unsub channelname[,channelname, …] channel/mute channelname[,channelname,…] channel/unmute channelname[,channelname,…]

channel/create channelname[;alias;alias[:typeclass]] [= description] channel/destroy channelname [= reason] channel/desc channelname = description channel/lock channelname = lockstring channel/unlock channelname = lockstring channel/ban channelname (list bans) channel/ban[/quiet] channelname[, channelname, …] = subscribername [: reason] channel/unban[/quiet] channelname[, channelname, …] = subscribername channel/boot[/quiet] channelname[,channelname,…] = subscribername [: reason]

Usage: channel channelname msg

channel channel name = msg (with space in channel name)

This sends a message to the channel. Note that you will rarely use this command like this; instead you can use the alias

channelname <msg> channelalias <msg>

For example

public Hello World pub Hello World

(this shortcut doesn’t work for aliases containing spaces)

See channel/alias for help on setting channel aliases.

Usage: channel/alias channel = alias[;alias[;alias…]]

channel/unalias alias channel - this will list your subs and aliases to each channel

Set one or more personal aliases for referencing a channel. For example:

channel/alias warrior’s guild = warrior;wguild;warchannel;warrior guild

You can now send to the channel using all of these:

warrior’s guild Hello warrior Hello wguild Hello warchannel Hello

Note that this will not work if the alias has a space in it. So the ‘warrior guild’ alias must be used with the channel command:

channel warrior guild = Hello

Channel-aliases can be removed one at a time, using the ‘/unalias’ switch.

Usage: channel/who channelname

List the channel’s subscribers. Shows who are currently offline or are muting the channel. Subscribers who are ‘muting’ will not see messages sent to the channel (use channel/mute to mute a channel).

Usage: channel/history channel [= index]

This will display the last |c20|n lines of channel history. By supplying an index number, you will step that many lines back before viewing those 20 lines.

For example:

channel/history public = 35

will go back 35 lines and show the previous 20 lines from that point (so lines -35 to -55).

Usage: channel/sub channel [=alias[;alias;…]]

channel/unsub channel

This subscribes you to a channel and optionally assigns personal shortcuts for you to use to send to that channel (see aliases). When you unsub, all your personal aliases will also be removed.

Usage: channel/mute channelname

channel/unmute channelname

Muting silences all output from the channel without actually un-subscribing. Other channel members will see that you are muted in the /who list. Sending a message to the channel will automatically unmute you.

Usage: channel/create channelname[;alias;alias[:typeclass]] [= description]

channel/destroy channelname [= reason]

Creates a new channel (or destroys one you control). You will automatically join the channel you create and everyone will be kicked and loose all aliases to a destroyed channel.

Usage: channel/lock channelname = lockstring

channel/unlock channelname = lockstring

Note: this is an admin command.

A lockstring is on the form locktype:lockfunc(). Channels understand three locktypes:

listen - who may listen or join the channel. send - who may send messages to the channel control - who controls the channel. This is usually the one creating

the channel.

Common lockfuncs are all() and perm(). To make a channel everyone can listen to but only builders can talk on, use this:

listen:all() send: perm(Builders)

Usage:

channel/boot[/quiet] channelname[,channelname,…] = subscribername [: reason] channel/ban channelname[, channelname, …] = subscribername [: reason] channel/unban channelname[, channelname, …] = subscribername channel/unban channelname channel/ban channelname (list bans)

Booting will kick a named subscriber from channel(s) temporarily. The ‘reason’ will be passed to the booted user. Unless the /quiet switch is used, the channel will also be informed of the action. A booted user is still able to re-connect, but they’ll have to set up their aliases again.

Banning will blacklist a user from (re)joining the provided channels. It will then proceed to boot them from those channels if they were connected. The ‘reason’ and /quiet works the same as for booting.

Example

boot mychannel1 = EvilUser : Kicking you to cool down a bit. ban mychannel1,mychannel2= EvilUser : Was banned for spamming.

account_caller = False
aliases = ['@channels', '@chan']
help_category = 'comms'
key = '@channel'
lock_storage = 'cmd:not pperm(channel_banned);admin:all();manage:all();changelocks:perm(Admin)'
search_index_entry = {'aliases': '@channels @chan', 'category': 'comms', 'key': '@channel', 'no_prefix': 'channel channels chan', 'tags': '', 'text': "\n Use and manage in-game channels.\n\n Usage:\n channel channelname <msg>\n channel channel name = <msg>\n channel (show all subscription)\n channel/all (show available channels)\n channel/alias channelname = alias[;alias...]\n channel/unalias alias\n channel/who channelname\n channel/history channelname [= index]\n channel/sub channelname [= alias[;alias...]]\n channel/unsub channelname[,channelname, ...]\n channel/mute channelname[,channelname,...]\n channel/unmute channelname[,channelname,...]\n\n channel/create channelname[;alias;alias[:typeclass]] [= description]\n channel/destroy channelname [= reason]\n channel/desc channelname = description\n channel/lock channelname = lockstring\n channel/unlock channelname = lockstring\n channel/ban channelname (list bans)\n channel/ban[/quiet] channelname[, channelname, ...] = subscribername [: reason]\n channel/unban[/quiet] channelname[, channelname, ...] = subscribername\n channel/boot[/quiet] channelname[,channelname,...] = subscribername [: reason]\n\n # subtopics\n\n ## sending\n\n Usage: channel channelname msg\n channel channel name = msg (with space in channel name)\n\n This sends a message to the channel. Note that you will rarely use this\n command like this; instead you can use the alias\n\n channelname <msg>\n channelalias <msg>\n\n For example\n\n public Hello World\n pub Hello World\n\n (this shortcut doesn't work for aliases containing spaces)\n\n See channel/alias for help on setting channel aliases.\n\n ## alias and unalias\n\n Usage: channel/alias channel = alias[;alias[;alias...]]\n channel/unalias alias\n channel - this will list your subs and aliases to each channel\n\n Set one or more personal aliases for referencing a channel. For example:\n\n channel/alias warrior's guild = warrior;wguild;warchannel;warrior guild\n\n You can now send to the channel using all of these:\n\n warrior's guild Hello\n warrior Hello\n wguild Hello\n warchannel Hello\n\n Note that this will not work if the alias has a space in it. So the\n 'warrior guild' alias must be used with the `channel` command:\n\n channel warrior guild = Hello\n\n Channel-aliases can be removed one at a time, using the '/unalias' switch.\n\n ## who\n\n Usage: channel/who channelname\n\n List the channel's subscribers. Shows who are currently offline or are\n muting the channel. Subscribers who are 'muting' will not see messages sent\n to the channel (use channel/mute to mute a channel).\n\n ## history\n\n Usage: channel/history channel [= index]\n\n This will display the last |c20|n lines of channel history. By supplying an\n index number, you will step that many lines back before viewing those 20 lines.\n\n For example:\n\n channel/history public = 35\n\n will go back 35 lines and show the previous 20 lines from that point (so\n lines -35 to -55).\n\n ## sub and unsub\n\n Usage: channel/sub channel [=alias[;alias;...]]\n channel/unsub channel\n\n This subscribes you to a channel and optionally assigns personal shortcuts\n for you to use to send to that channel (see aliases). When you unsub, all\n your personal aliases will also be removed.\n\n ## mute and unmute\n\n Usage: channel/mute channelname\n channel/unmute channelname\n\n Muting silences all output from the channel without actually\n un-subscribing. Other channel members will see that you are muted in the /who\n list. Sending a message to the channel will automatically unmute you.\n\n ## create and destroy\n\n Usage: channel/create channelname[;alias;alias[:typeclass]] [= description]\n channel/destroy channelname [= reason]\n\n Creates a new channel (or destroys one you control). You will automatically\n join the channel you create and everyone will be kicked and loose all aliases\n to a destroyed channel.\n\n ## lock and unlock\n\n Usage: channel/lock channelname = lockstring\n channel/unlock channelname = lockstring\n\n Note: this is an admin command.\n\n A lockstring is on the form locktype:lockfunc(). Channels understand three\n locktypes:\n listen - who may listen or join the channel.\n send - who may send messages to the channel\n control - who controls the channel. This is usually the one creating\n the channel.\n\n Common lockfuncs are all() and perm(). To make a channel everyone can\n listen to but only builders can talk on, use this:\n\n listen:all()\n send: perm(Builders)\n\n ## boot and ban\n\n Usage:\n channel/boot[/quiet] channelname[,channelname,...] = subscribername [: reason]\n channel/ban channelname[, channelname, ...] = subscribername [: reason]\n channel/unban channelname[, channelname, ...] = subscribername\n channel/unban channelname\n channel/ban channelname (list bans)\n\n Booting will kick a named subscriber from channel(s) temporarily. The\n 'reason' will be passed to the booted user. Unless the /quiet switch is\n used, the channel will also be informed of the action. A booted user is\n still able to re-connect, but they'll have to set up their aliases again.\n\n Banning will blacklist a user from (re)joining the provided channels. It\n will then proceed to boot them from those channels if they were connected.\n The 'reason' and `/quiet` works the same as for booting.\n\n Example:\n boot mychannel1 = EvilUser : Kicking you to cool down a bit.\n ban mychannel1,mychannel2= EvilUser : Was banned for spamming.\n\n "}
class evennia.commands.default.comms.CmdPage(**kwargs)[source]

Bases: evennia.commands.default.muxcommand.MuxCommand

send a private message to another account

Usage:

page <account> <message> page[/switches] [<account>,<account>,… = <message>] tell ‘’ page <number>

Switches:

last - shows who you last messaged list - show your last <number> of tells/pages (default)

Send a message to target user (if online). If no argument is given, you will get a list of your latest messages. The equal sign is needed for multiple targets or if sending to target with space in the name.

key = 'page'
aliases = ['tell']
switch_options = ('last', 'list')
locks = 'cmd:not pperm(page_banned)'
help_category = 'comms'
account_caller = True
func()[source]

Implement function using the Msg methods

lock_storage = 'cmd:not pperm(page_banned)'
search_index_entry = {'aliases': 'tell', 'category': 'comms', 'key': 'page', 'no_prefix': ' tell', 'tags': '', 'text': "\n send a private message to another account\n\n Usage:\n page <account> <message>\n page[/switches] [<account>,<account>,... = <message>]\n tell ''\n page <number>\n\n Switches:\n last - shows who you last messaged\n list - show your last <number> of tells/pages (default)\n\n Send a message to target user (if online). If no argument is given, you\n will get a list of your latest messages. The equal sign is needed for\n multiple targets or if sending to target with space in the name.\n\n "}
class evennia.commands.default.comms.CmdIRC2Chan(**kwargs)[source]

Bases: evennia.commands.default.muxcommand.MuxCommand

Link an evennia channel to an external IRC channel

Usage:

irc2chan[/switches] <evennia_channel> = <ircnetwork> <port> <#irchannel> <botname>[:typeclass] irc2chan/delete botname|#dbid

Switches:
/delete
  • this will delete the bot and remove the irc connection

to the channel. Requires the botname or #dbid as input.

/remove
  • alias to /delete

/disconnect - alias to /delete /list - show all irc<->evennia mappings /ssl - use an SSL-encrypted connection

Example

irc2chan myircchan = irc.dalnet.net 6667 #mychannel evennia-bot irc2chan public = irc.freenode.net 6667 #evgaming #evbot:accounts.mybot.MyBot

This creates an IRC bot that connects to a given IRC network and channel. If a custom typeclass path is given, this will be used instead of the default bot class. The bot will relay everything said in the evennia channel to the IRC channel and vice versa. The bot will automatically connect at server start, so this command need only be given once. The /disconnect switch will permanently delete the bot. To only temporarily deactivate it, use the |wservices|n command instead. Provide an optional bot class path to use a custom bot.

key = 'irc2chan'
switch_options = ('delete', 'remove', 'disconnect', 'list', 'ssl')
locks = 'cmd:serversetting(IRC_ENABLED) and pperm(Developer)'
help_category = 'comms'
func()[source]

Setup the irc-channel mapping

aliases = []
lock_storage = 'cmd:serversetting(IRC_ENABLED) and pperm(Developer)'
search_index_entry = {'aliases': '', 'category': 'comms', 'key': 'irc2chan', 'no_prefix': ' ', 'tags': '', 'text': '\n Link an evennia channel to an external IRC channel\n\n Usage:\n irc2chan[/switches] <evennia_channel> = <ircnetwork> <port> <#irchannel> <botname>[:typeclass]\n irc2chan/delete botname|#dbid\n\n Switches:\n /delete - this will delete the bot and remove the irc connection\n to the channel. Requires the botname or #dbid as input.\n /remove - alias to /delete\n /disconnect - alias to /delete\n /list - show all irc<->evennia mappings\n /ssl - use an SSL-encrypted connection\n\n Example:\n irc2chan myircchan = irc.dalnet.net 6667 #mychannel evennia-bot\n irc2chan public = irc.freenode.net 6667 #evgaming #evbot:accounts.mybot.MyBot\n\n This creates an IRC bot that connects to a given IRC network and\n channel. If a custom typeclass path is given, this will be used\n instead of the default bot class.\n The bot will relay everything said in the evennia channel to the\n IRC channel and vice versa. The bot will automatically connect at\n server start, so this command need only be given once. The\n /disconnect switch will permanently delete the bot. To only\n temporarily deactivate it, use the |wservices|n command instead.\n Provide an optional bot class path to use a custom bot.\n '}
class evennia.commands.default.comms.CmdIRCStatus(**kwargs)[source]

Bases: evennia.commands.default.muxcommand.MuxCommand

Check and reboot IRC bot.

Usage:

ircstatus [#dbref ping | nicklist | reconnect]

If not given arguments, will return a list of all bots (like irc2chan/list). The ‘ping’ argument will ping the IRC network to see if the connection is still responsive. The ‘nicklist’ argument (aliases are ‘who’ and ‘users’) will return a list of users on the remote IRC channel. Finally, ‘reconnect’ will force the client to disconnect and reconnect again. This may be a last resort if the client has silently lost connection (this may happen if the remote network experience network issues). During the reconnection messages sent to either channel will be lost.

key = 'ircstatus'
locks = 'cmd:serversetting(IRC_ENABLED) and perm(ircstatus) or perm(Builder))'
help_category = 'comms'
func()[source]

Handles the functioning of the command.

aliases = []
lock_storage = 'cmd:serversetting(IRC_ENABLED) and perm(ircstatus) or perm(Builder))'
search_index_entry = {'aliases': '', 'category': 'comms', 'key': 'ircstatus', 'no_prefix': ' ', 'tags': '', 'text': "\n Check and reboot IRC bot.\n\n Usage:\n ircstatus [#dbref ping | nicklist | reconnect]\n\n If not given arguments, will return a list of all bots (like\n irc2chan/list). The 'ping' argument will ping the IRC network to\n see if the connection is still responsive. The 'nicklist' argument\n (aliases are 'who' and 'users') will return a list of users on the\n remote IRC channel. Finally, 'reconnect' will force the client to\n disconnect and reconnect again. This may be a last resort if the\n client has silently lost connection (this may happen if the remote\n network experience network issues). During the reconnection\n messages sent to either channel will be lost.\n\n "}
class evennia.commands.default.comms.CmdRSS2Chan(**kwargs)[source]

Bases: evennia.commands.default.muxcommand.MuxCommand

link an evennia channel to an external RSS feed

Usage:

rss2chan[/switches] <evennia_channel> = <rss_url>

Switches:
/disconnect - this will stop the feed and remove the connection to the

channel.

/remove
/list
  • show all rss->evennia mappings

Example

rss2chan rsschan = http://code.google.com/feeds/p/evennia/updates/basic

This creates an RSS reader that connects to a given RSS feed url. Updates will be echoed as a title and news link to the given channel. The rate of updating is set with the RSS_UPDATE_INTERVAL variable in settings (default is every 10 minutes).

When disconnecting you need to supply both the channel and url again so as to identify the connection uniquely.

key = 'rss2chan'
switch_options = ('disconnect', 'remove', 'list')
locks = 'cmd:serversetting(RSS_ENABLED) and pperm(Developer)'
help_category = 'comms'
func()[source]

Setup the rss-channel mapping

aliases = []
lock_storage = 'cmd:serversetting(RSS_ENABLED) and pperm(Developer)'
search_index_entry = {'aliases': '', 'category': 'comms', 'key': 'rss2chan', 'no_prefix': ' ', 'tags': '', 'text': '\n link an evennia channel to an external RSS feed\n\n Usage:\n rss2chan[/switches] <evennia_channel> = <rss_url>\n\n Switches:\n /disconnect - this will stop the feed and remove the connection to the\n channel.\n /remove - "\n /list - show all rss->evennia mappings\n\n Example:\n rss2chan rsschan = http://code.google.com/feeds/p/evennia/updates/basic\n\n This creates an RSS reader that connects to a given RSS feed url. Updates\n will be echoed as a title and news link to the given channel. The rate of\n updating is set with the RSS_UPDATE_INTERVAL variable in settings (default\n is every 10 minutes).\n\n When disconnecting you need to supply both the channel and url again so as\n to identify the connection uniquely.\n '}
class evennia.commands.default.comms.CmdGrapevine2Chan(**kwargs)[source]

Bases: evennia.commands.default.muxcommand.MuxCommand

Link an Evennia channel to an external Grapevine channel

Usage:

grapevine2chan[/switches] <evennia_channel> = <grapevine_channel> grapevine2chan/disconnect <connection #id>

Switches:
/list
  • (or no switch): show existing grapevine <-> Evennia

mappings and available grapevine chans

/remove
  • alias to disconnect

/delete
  • alias to disconnect

Example

grapevine2chan mygrapevine = gossip

This creates a link between an in-game Evennia channel and an external Grapevine channel. The game must be registered with the Grapevine network (register at https://grapevine.haus) and the GRAPEVINE_* auth information must be added to game settings.

key = 'grapevine2chan'
switch_options = ('disconnect', 'remove', 'delete', 'list')
locks = 'cmd:serversetting(GRAPEVINE_ENABLED) and pperm(Developer)'
help_category = 'comms'
func()[source]

Setup the Grapevine channel mapping

aliases = []
lock_storage = 'cmd:serversetting(GRAPEVINE_ENABLED) and pperm(Developer)'
search_index_entry = {'aliases': '', 'category': 'comms', 'key': 'grapevine2chan', 'no_prefix': ' ', 'tags': '', 'text': '\n Link an Evennia channel to an external Grapevine channel\n\n Usage:\n grapevine2chan[/switches] <evennia_channel> = <grapevine_channel>\n grapevine2chan/disconnect <connection #id>\n\n Switches:\n /list - (or no switch): show existing grapevine <-> Evennia\n mappings and available grapevine chans\n /remove - alias to disconnect\n /delete - alias to disconnect\n\n Example:\n grapevine2chan mygrapevine = gossip\n\n This creates a link between an in-game Evennia channel and an external\n Grapevine channel. The game must be registered with the Grapevine network\n (register at https://grapevine.haus) and the GRAPEVINE_* auth information\n must be added to game settings.\n '}
class evennia.commands.default.comms.CmdDiscord2Chan(**kwargs)[source]

Bases: evennia.commands.default.muxcommand.MuxCommand

Link an Evennia channel to an external Discord channel

Usage:

discord2chan[/switches] discord2chan[/switches] <evennia_channel> [= <discord_channel_id>]

Switches:
/list
  • (or no switch) show existing Evennia <-> Discord links

/remove
  • remove an existing link by link ID

/delete
  • alias to remove

/guild
  • toggle the Discord server tag on/off

/channel - toggle the Evennia/Discord channel tags on/off /start - tell the bot to start, in case it lost its connection

Example

discord2chan mydiscord = 555555555555555

This creates a link between an in-game Evennia channel and an external Discord channel. You must have a valid Discord bot application ( https://discord.com/developers/applications ) and your DISCORD_BOT_TOKEN must be added to settings. (Please put it in secret_settings !)

key = 'discord2chan'
aliases = ['discord']
switch_options = ('channel', 'delete', 'guild', 'list', 'remove', 'start')
locks = 'cmd:serversetting(DISCORD_ENABLED) and pperm(Developer)'
help_category = 'comms'
func()[source]

Manage the Evennia<->Discord channel links

lock_storage = 'cmd:serversetting(DISCORD_ENABLED) and pperm(Developer)'
search_index_entry = {'aliases': 'discord', 'category': 'comms', 'key': 'discord2chan', 'no_prefix': ' discord', 'tags': '', 'text': '\n Link an Evennia channel to an external Discord channel\n\n Usage:\n discord2chan[/switches]\n discord2chan[/switches] <evennia_channel> [= <discord_channel_id>]\n\n Switches:\n /list - (or no switch) show existing Evennia <-> Discord links\n /remove - remove an existing link by link ID\n /delete - alias to remove\n /guild - toggle the Discord server tag on/off\n /channel - toggle the Evennia/Discord channel tags on/off\n /start - tell the bot to start, in case it lost its connection\n\n Example:\n discord2chan mydiscord = 555555555555555\n\n This creates a link between an in-game Evennia channel and an external\n Discord channel. You must have a valid Discord bot application\n ( https://discord.com/developers/applications ) and your DISCORD_BOT_TOKEN\n must be added to settings. (Please put it in secret_settings !)\n '}