put a bunch of repeated code into a function and added timestamps to status/nick changes