Advertisement
Buffet_Time

Untitled

Oct 22nd, 2018
138
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.46 KB | None | 0 0
  1. import string
  2. from Socket import sendMessage
  3.  
  4. def loadingComplete(line):
  5. if("End of /NAMES list" in line):
  6. return False
  7. else:
  8. return True
  9.  
  10. def joinRoom(s):
  11. readbuffer = ""
  12. Loading = True
  13. while Loading:
  14. readbuffer = readbuffer + s.recv(1024).decode()
  15. temp = str.split(readbuffer, "\n")
  16. readbuffer = temp.pop()
  17.  
  18. for line in temp:
  19. print(line)
  20. Loading = loadingComplete(line)
  21. sendMessage(str(s, b"Successfully joined chat", "UTF-8"))
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement