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:
Griatch 2013-04-12 14:27:36 +02:00
parent b58a464409
commit 0fddf433dc
9 changed files with 137 additions and 154 deletions

View file

@ -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,