Fixed database handling, added crappy nickserv support