Update hexchat.py

Linux needs an infinite loop to keep the program running. Also, error handling was fixed with respect to refused connections on the server side.