mirror of
https://github.com/evennia/evennia.git
synced 2026-03-16 21:06:30 +01:00
allow for channel commands without a current subscription, so that players can use channelcommands such as <channelname>/history
This commit is contained in:
parent
024a476355
commit
441b081e55
1 changed files with 2 additions and 3 deletions
|
|
@ -234,13 +234,12 @@ class ChannelHandler(object):
|
|||
# create a new cmdset holding all viable channels
|
||||
chan_cmdset = None
|
||||
chan_cmds = [channelcmd for channel, channelcmd in self.cached_channel_cmds.iteritems()
|
||||
if channel.subscriptions.has(source_object)
|
||||
and channelcmd.access(source_object, 'send')]
|
||||
if channelcmd.access(source_object, 'send')]
|
||||
if chan_cmds:
|
||||
chan_cmdset = cmdset.CmdSet()
|
||||
chan_cmdset.key = 'ChannelCmdSet'
|
||||
chan_cmdset.priority = 101
|
||||
chan_cmdset.duplicates = True
|
||||
chan_cmdset.duplicates = False
|
||||
for cmd in chan_cmds:
|
||||
chan_cmdset.add(cmd)
|
||||
self.cached_cmdsets[source_object] = chan_cmdset
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue