(485 . 8)(485 . 11)
107
108 def peer_handler():
109 if len(arguments) == 1:
110 self.server.state.add_peer(arguments[0])
111 self.pest_reply("added new peer %s" % arguments[0])
112 try:
113 self.server.state.add_peer(arguments[0])
114 self.pest_reply("added new peer %s" % arguments[0])
115 except:
116 self.pest_reply("error attempting to add peer %s" % arguments[0])
117 else:
118 self.pest_reply("Usage: PEER <HANDLE>")
119
(538 . 7)(541 . 8)
121 address_ip, port = string.split(address, ":")
122 self.server.state.update_address_table({"handle": handle,
123 "address": address_ip,
124 "port": port})
125 "port": port},
126 False)
127 self.pest_reply("updated address table: %s %s" % (handle, address))
128 return
129 elif len(arguments) > 2:
(548 . 7)(552 . 7)
131 for address in at:
132 self.pest_reply("%s %s %s" % (address["handle"],
133 address["address"],
134 address["updated_at"]))
135 address["active_at"]))
136 else:
137 self.pest_reply("no results")
138