Some portability improvements, doesn't work on python3 yet
Initial version og GS peerchat class