mirror of
https://github.com/evennia/evennia.git
synced 2026-03-19 22:36:31 +01:00
Handle IMC ice-destroy packets.
This commit is contained in:
parent
181133d917
commit
9b8f1cf3ea
3 changed files with 9 additions and 5 deletions
|
|
@ -63,9 +63,11 @@ def cmd_imcchanlist(command):
|
|||
retval += ' Full Name Name Owner Perm Policy\n\r'
|
||||
retval += ' --------- ---- ----- ---- ------\n\r'
|
||||
for channel in IMC2_CHANLIST.get_channel_list():
|
||||
retval += ' %-18s %-10s %-15s %-7s %s\n\r' % (channel.full_name, channel.name,
|
||||
channel.owner, channel.level,
|
||||
channel.policy)
|
||||
retval += ' %-18s %-10s %-15s %-7s %s\n\r' % (channel.name,
|
||||
channel.localname,
|
||||
channel.owner,
|
||||
channel.level,
|
||||
channel.policy)
|
||||
retval += '%s channels found.' % len(IMC2_CHANLIST.chan_list)
|
||||
source_object.emit_to(retval)
|
||||
GLOBAL_CMD_TABLE.add_command("imcchanlist", cmd_imcchanlist)
|
||||
|
|
|
|||
|
|
@ -168,6 +168,8 @@ class IMC2Protocol(StatefulTelnetProtocol):
|
|||
IMC2_MUDLIST.remove_mud_from_packet(packet)
|
||||
elif packet.packet_type == 'ice-update':
|
||||
IMC2_CHANLIST.update_channel_from_packet(packet)
|
||||
elif packet.packet_type == 'ice-destroy':
|
||||
IMC2_CHANLIST.remove_channel_from_packet(packet)
|
||||
elif packet.packet_type == 'tell':
|
||||
sessions = session_mgr.find_sessions_from_username(packet.target)
|
||||
for session in sessions:
|
||||
|
|
|
|||
|
|
@ -61,8 +61,8 @@ class IMC2Channel(object):
|
|||
Stores information about channels available on the network.
|
||||
"""
|
||||
def __init__(self, packet):
|
||||
self.name = packet.optional_data.get('localname', None)
|
||||
self.full_name = packet.optional_data.get('channel', None)
|
||||
self.localname = packet.optional_data.get('localname', None)
|
||||
self.name = packet.optional_data.get('channel', None)
|
||||
self.level = packet.optional_data.get('level', None)
|
||||
self.owner = packet.optional_data.get('owner', None)
|
||||
self.policy = packet.optional_data.get('policy', None)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue