i made one of these a while back, if i was you id use $address in stead of $nick becuase people will change thier nicks and not thier adresses :)
other than that n1