mirror of
https://github.com/evennia/evennia.git
synced 2026-04-06 07:57:16 +02:00
Looks like the 'who' packet doesn't have a target element in the target@destination segment of the packet. Handle this semi-intelligently when ran into.
This commit is contained in:
parent
859166a41c
commit
317a4f1532
1 changed files with 8 additions and 1 deletions
|
|
@ -74,7 +74,14 @@ class IMC2Packet(object):
|
|||
target_destination = token
|
||||
split_target_destination = target_destination.split('@')
|
||||
self.target = split_target_destination[0]
|
||||
self.destination = split_target_destination[1]
|
||||
try:
|
||||
self.destination = split_target_destination[1]
|
||||
except IndexError:
|
||||
# There is only one element to the target@dest segment
|
||||
# of the packet. Wipe the target and move the captured
|
||||
# value to the destination attrib.
|
||||
self.target = '*'
|
||||
self.destination = split_target_destination[0]
|
||||
elif counter > 4:
|
||||
# Populate optional data.
|
||||
key, value = token.split('=', 1)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue