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 += ' Full Name Name Owner Perm Policy\n\r'
|
||||||
retval += ' --------- ---- ----- ---- ------\n\r'
|
retval += ' --------- ---- ----- ---- ------\n\r'
|
||||||
for channel in IMC2_CHANLIST.get_channel_list():
|
for channel in IMC2_CHANLIST.get_channel_list():
|
||||||
retval += ' %-18s %-10s %-15s %-7s %s\n\r' % (channel.full_name, channel.name,
|
retval += ' %-18s %-10s %-15s %-7s %s\n\r' % (channel.name,
|
||||||
channel.owner, channel.level,
|
channel.localname,
|
||||||
channel.policy)
|
channel.owner,
|
||||||
|
channel.level,
|
||||||
|
channel.policy)
|
||||||
retval += '%s channels found.' % len(IMC2_CHANLIST.chan_list)
|
retval += '%s channels found.' % len(IMC2_CHANLIST.chan_list)
|
||||||
source_object.emit_to(retval)
|
source_object.emit_to(retval)
|
||||||
GLOBAL_CMD_TABLE.add_command("imcchanlist", cmd_imcchanlist)
|
GLOBAL_CMD_TABLE.add_command("imcchanlist", cmd_imcchanlist)
|
||||||
|
|
|
||||||
|
|
@ -168,6 +168,8 @@ class IMC2Protocol(StatefulTelnetProtocol):
|
||||||
IMC2_MUDLIST.remove_mud_from_packet(packet)
|
IMC2_MUDLIST.remove_mud_from_packet(packet)
|
||||||
elif packet.packet_type == 'ice-update':
|
elif packet.packet_type == 'ice-update':
|
||||||
IMC2_CHANLIST.update_channel_from_packet(packet)
|
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':
|
elif packet.packet_type == 'tell':
|
||||||
sessions = session_mgr.find_sessions_from_username(packet.target)
|
sessions = session_mgr.find_sessions_from_username(packet.target)
|
||||||
for session in sessions:
|
for session in sessions:
|
||||||
|
|
|
||||||
|
|
@ -61,8 +61,8 @@ class IMC2Channel(object):
|
||||||
Stores information about channels available on the network.
|
Stores information about channels available on the network.
|
||||||
"""
|
"""
|
||||||
def __init__(self, packet):
|
def __init__(self, packet):
|
||||||
self.name = packet.optional_data.get('localname', None)
|
self.localname = packet.optional_data.get('localname', None)
|
||||||
self.full_name = packet.optional_data.get('channel', None)
|
self.name = packet.optional_data.get('channel', None)
|
||||||
self.level = packet.optional_data.get('level', None)
|
self.level = packet.optional_data.get('level', None)
|
||||||
self.owner = packet.optional_data.get('owner', None)
|
self.owner = packet.optional_data.get('owner', None)
|
||||||
self.policy = packet.optional_data.get('policy', None)
|
self.policy = packet.optional_data.get('policy', None)
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue