Fixed server code

master
haddaway 2012-10-21 14:42:39 -07:00
parent da278ff915
commit 0819a5ae0e
2 changed files with 2 additions and 3 deletions

View File

@ -127,7 +127,6 @@ class ToorMessage():
self.xid = self.get_random_xid() self.xid = self.get_random_xid()
else: else:
self.xid = xid self.xid = xid
self.type = protocol_type self.type = protocol_type
self.index = index self.index = index
self.last = last self.last = last

View File

@ -35,7 +35,7 @@ def thread_run(visual):
if toor_message.type == ToorChatProtocol.get_web_response_type(): if toor_message.type == ToorChatProtocol.get_web_response_type():
# lets see if its the response were looking for # lets see if its the response were looking for
if toor_message.xid == visual.request_xid: if toor_message.xid == visual.request_xid:
index = find_message_in_website(toor_message, visual) find_message_in_website(toor_message, visual)
if len(visual.website_buffer) == toor_message.last: if len(visual.website_buffer) == toor_message.last:
#sort messages #sort messages
#Render website #Render website
@ -115,8 +115,8 @@ class Visualizer():
if entry == ord('w'): if entry == ord('w'):
self.screen.nodelay(0) self.screen.nodelay(0)
user_input = self.screen.getstr(1, 1, 60) user_input = self.screen.getstr(1, 1, 60)
request = self.protocol.send_web_request(user_input)
self.request_xid = request.xid self.request_xid = request.xid
request = self.protocol.send_web_request(user_input)
self.screen.nodelay(1) self.screen.nodelay(1)
self.screen.addstr(1,1," "*(self.screen_max_x-3)) self.screen.addstr(1,1," "*(self.screen_max_x-3))