diff --git a/bert.py b/bert.py index 30e27b5..77791e7 100755 --- a/bert.py +++ b/bert.py @@ -50,9 +50,9 @@ y = "\x038" r = "\x034" g = "\x033" - -s = socket.socket(socket.AF_INET, socket.SOCK_STREAM) -irc = ssl.wrap_socket(s) +context = ssl.create_default_context() +with socket.socket(socket.AF_INET, socket.SOCK_STREAM) as sock: + irc = context.wrap_socket(sock, server_hostname=host) # Currency API