Various improvements

Small patches from developing an IRC logging bot based on Net::IRC. Feel free to pick out the patches you approve of.