fix ZNC and some other misc bugfixes and stuff, see commit for details

undescriptive commit message due to me currently being on holiday