Update hexchat.py

cleaner code and base64 and UTF decode error handling.