mirror of
https://github.com/evennia/evennia.git
synced 2026-03-30 04:27:16 +02:00
Updated all Player-level commands to properly relay messages using self.msg rather than caller.msg (the former will properly relay to the right sessid without needing any extra arguments).
This commit is contained in:
parent
b58a464409
commit
0fddf433dc
9 changed files with 137 additions and 154 deletions
|
|
@ -62,20 +62,20 @@ class ChannelCommand(command.Command):
|
|||
channelkey, msg = self.args
|
||||
caller = self.caller
|
||||
if not msg:
|
||||
caller.msg("Say what?")
|
||||
self.msg("Say what?")
|
||||
return
|
||||
channel = Channel.objects.get_channel(channelkey)
|
||||
|
||||
if not channel:
|
||||
caller.msg("Channel '%s' not found." % channelkey)
|
||||
self.msg("Channel '%s' not found." % channelkey)
|
||||
return
|
||||
if not channel.has_connection(caller):
|
||||
string = "You are not connected to channel '%s'."
|
||||
caller.msg(string % channelkey)
|
||||
self.msg(string % channelkey)
|
||||
return
|
||||
if not channel.access(caller, 'send'):
|
||||
string = "You are not permitted to send to channel '%s'."
|
||||
caller.msg(string % channelkey)
|
||||
self.msg(string % channelkey)
|
||||
return
|
||||
msg = "[%s] %s: %s" % (channel.key, caller.name, msg)
|
||||
# we can't use the utils.create function to make the Msg,
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue