lightirc: fix a few crashes