mirror of
https://github.com/evennia/evennia.git
synced 2026-03-30 04:27:16 +02:00
Added dynamic formatting to comm channel, as inspired by the way done in Arxmush.
This commit is contained in:
parent
653a46b7ad
commit
d00ff9ae32
1 changed files with 9 additions and 6 deletions
|
|
@ -32,15 +32,13 @@ from django.utils.translation import ugettext as _
|
|||
|
||||
class ChannelCommand(command.Command):
|
||||
"""
|
||||
Channel
|
||||
{channelkey} channel
|
||||
|
||||
Usage:
|
||||
<channel name or alias> <message>
|
||||
|
||||
This is a channel. If you have subscribed to it, you can send to
|
||||
it by entering its name or alias, followed by the text you want to
|
||||
send.
|
||||
{lower_channelkey} <message>
|
||||
{lower_channelkey} history <num>[-<num>]
|
||||
|
||||
{channeldesc}
|
||||
"""
|
||||
# this flag is what identifies this cmd as a channel cmd
|
||||
# and branches off to the system send-to-channel command
|
||||
|
|
@ -179,6 +177,11 @@ class ChannelHandler(object):
|
|||
obj=channel,
|
||||
arg_regex=r"\s.*?",
|
||||
is_channel=True)
|
||||
# format the help entry
|
||||
key = channel.key
|
||||
cmd.__doc__ = cmd.__doc__.format(channelkey=key,
|
||||
lower_channelkey=key.strip().lower(),
|
||||
channeldesc=channel.db.desc.strip())
|
||||
self.cached_channel_cmds.append(cmd)
|
||||
self.cached_cmdsets = {}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue