Some bug fixes in the IMC system.
This commit is contained in:
parent
b856cb8faf
commit
c70d59045a
3 changed files with 22 additions and 18 deletions
|
|
@ -6,6 +6,12 @@ from src.objects.models import ObjectDB
|
|||
from src.comms.imc2lib import imc2_ansi
|
||||
|
||||
def handle_whois_reply(packet):
|
||||
"""
|
||||
When the player sends an imcwhois <playername> request, the outgoing
|
||||
packet contains the id of the one asking. This handler catches the
|
||||
(possible) reply from the server, parses the id back to the
|
||||
original asker and tells them the result.
|
||||
"""
|
||||
try:
|
||||
pobject = ObjectDB.objects.get(id=packet.target)
|
||||
response_text = imc2_ansi.parse_ansi(packet.optional_data.get('text', 'Unknown'))
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue