Skip to content
This repository

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse code

Made recent connection's persistant data work properly.

  • Loading branch information...
commit 41193ff44f93a16433a747706a6e80919eceef0a 1 parent 6518e6e
Channon Price authored

Showing 1 changed file with 2 additions and 1 deletion. Show diff stats Hide diff stats

  1. +2 1  pyChat.py
3  pyChat.py
@@ -294,7 +294,6 @@ def contacts_window(master):
294 294 for person in contact_array:
295 295 listbox.insert(END, contact_array[person][1]+" "+person+" "+contact_array[person][0])
296 296 listbox.pack(side=LEFT, fill=BOTH, expand=1)
297   - listbox.insert(END, "Test")
298 297
299 298
300 299 #Loads the recent chats out of the persistant file contacts.dat
@@ -426,6 +425,7 @@ def run ( self ):
426 425 secret = power(b, a) % prime
427 426 secret_array[conn]=secret #store the encryption key by the connection
428 427 username_array[conn] = addr[0]
  428 + contact_array[str(addr[0])]=[str(PORT), "CHANGEME"]
429 429 threading.Thread(target=ServerRunner, args=(conn, secret)).start()
430 430 Server().start()
431 431
@@ -476,6 +476,7 @@ def run(self):
476 476 secret = power(a,b)%prime
477 477 secret_array[conn]=secret
478 478 username_array[conn] = HOST
  479 + contact_array[conn.getpeername()[0]]=[str(PORT), "CHANGEME"]
479 480 threading.Thread(target=ClientRunner, args=(conn, secret)).start()
480 481
481 482

0 comments on commit 41193ff

Please sign in to comment.
Something went wrong with that request. Please try again.