Implemented imcwhois command as part of the imcinfo command cluster.

This commit is contained in:
Griatch 2011-04-19 21:05:18 +00:00
parent 36bc29865b
commit b856cb8faf
6 changed files with 45 additions and 229 deletions

View file

@ -328,6 +328,11 @@ class IMC2Protocol(telnet.StatefulTelnetProtocol):
destination = data.get("destination", "Unknown")
self.send_packet(pck.IMC2PacketTell(from_name, target, destination, message))
elif packet_type == "imcwhois":
# send a whois request
if type(data) == dict:
target = data.get("target", "Unknown")
self.send_packet(pck.IMC2PacketWhois(from_obj.id, target))
class IMC2Factory(protocol.ClientFactory):
"""