Cleaned up worst instability. Test suite does validate yet.
This commit is contained in:
parent
fa93c70e7f
commit
e36c7d5cc1
24 changed files with 134 additions and 300 deletions
|
|
@ -416,9 +416,8 @@ class CmdEmit(MuxCommand):
|
|||
continue
|
||||
if obj.access(caller, 'tell'):
|
||||
obj.msg(message)
|
||||
if send_to_contents:
|
||||
for content in obj.contents:
|
||||
content.msg(message)
|
||||
if send_to_contents and hasattr(obj, "msg_contents"):
|
||||
obj.msg_contents(message)
|
||||
caller.msg("Emitted to %s and its contents." % objname)
|
||||
else:
|
||||
caller.msg("Emitted to %s." % objname)
|
||||
|
|
|
|||
|
|
@ -155,7 +155,7 @@ class CmdDelCom(MuxPlayerCommand):
|
|||
return
|
||||
else:
|
||||
# we are removing a channel nick
|
||||
channame = caller.nicks.get_replace(key=ostring, category="channel")
|
||||
channame = caller.nicks.get(key=ostring, category="channel")
|
||||
channel = find_channel(caller, channame, silent=True)
|
||||
if not channel:
|
||||
self.msg("No channel with alias '%s' was found." % ostring)
|
||||
|
|
@ -949,7 +949,7 @@ class CmdIMCInfo(MuxCommand):
|
|||
return
|
||||
from src.comms.imc2 import IMC2_CLIENT
|
||||
self.msg("Sending IMC whois request. If you receive no response, no matches were found.")
|
||||
IMC2_CLIENT.msg_imc2(None, from_obj=self.caller, packet_type="imcwhois", data={"target":self.args})
|
||||
IMC2_CLIENT.msg_imc2(None, from_obj=self.caller, packet_type="imcwhois", target=self.args)
|
||||
|
||||
elif not self.switches or "channels" in self.switches or self.cmdstring == "@imcchanlist":
|
||||
# show channels
|
||||
|
|
@ -1007,7 +1007,7 @@ class CmdIMCTell(MuxCommand):
|
|||
data = {"target":target, "destination":destination}
|
||||
|
||||
# send to imc2
|
||||
IMC2_CLIENT.msg_imc2(message, from_obj=self.caller, packet_type="imctell", data=data)
|
||||
IMC2_CLIENT.msg_imc2(message, from_obj=self.caller, packet_type="imctell", **data)
|
||||
|
||||
self.msg("You paged {c%s@%s{n (over IMC): '%s'." % (target, destination, message))
|
||||
|
||||
|
|
|
|||
|
|
@ -628,10 +628,10 @@ class CmdQuell(MuxPlayerCommand):
|
|||
player.attributes.remove('_quell')
|
||||
self.msg("Player permissions%s restored." % permstr)
|
||||
else:
|
||||
if player.get('_quell'):
|
||||
if player.attributes.get('_quell'):
|
||||
self.msg("Already quelling Player%s permissions." % permstr)
|
||||
return
|
||||
player.add('_quell', True)
|
||||
player.attributes.add('_quell', True)
|
||||
self.msg("Quelling Player permissions%s. Use @unquell to get them back." % permstr)
|
||||
self._recache_locks(player)
|
||||
|
||||
|
|
|
|||
|
|
@ -163,9 +163,9 @@ class CmdPy(MuxCommand):
|
|||
'inherits_from':utils.inherits_from}
|
||||
|
||||
try:
|
||||
self.msg(">>> %s" % pycode, data={"raw":True}, sessid=self.sessid)
|
||||
self.msg(">>> %s" % pycode, raw=True, sessid=self.sessid)
|
||||
except TypeError:
|
||||
self.msg(">>> %s" % pycode, data={"raw":True})
|
||||
self.msg(">>> %s" % pycode, raw=True)
|
||||
|
||||
|
||||
mode = "eval"
|
||||
|
|
|
|||
|
|
@ -78,9 +78,11 @@ class CommandTest(TestCase):
|
|||
cmdobj.cmdstring = cmdobj.key
|
||||
cmdobj.args = args
|
||||
cmdobj.cmdset = cmdset
|
||||
cmdobj.sessid = 1
|
||||
cmdobj.session = None
|
||||
cmdobj.player = self.player
|
||||
cmdobj.raw_string = cmdobj.key + " " + args
|
||||
cmdobj.obj = self.char1
|
||||
cmdobj.sessid = 1
|
||||
# test
|
||||
self.char1.player.ndb.stored_msg = []
|
||||
cmdobj.at_pre_cmd()
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue