Tweak DNR expiration code for aesthetics.
authorMichael Poole <mdpoole@troilus.org>
Tue, 27 Feb 2007 02:26:35 +0000 (21:26 -0500)
committerMichael Poole <mdpoole@troilus.org>
Mon, 12 Mar 2007 03:43:32 +0000 (23:43 -0400)
commita46b3fd32bc8c8eef811894628928896dbb4cb56
treef19198a54b3f5120a74554f17b6034441c28dec7
parent2e71baed62ba17eebfd63b464a135a46dd50661a
Tweak DNR expiration code for aesthetics.

src/chanserv.c (CSMSG_DNR_INFO_SET): Add missing "ago".
  (chanserv_find_dnrs): Add "max" argument.  Revise to remove expired
    DNRs as they are found.
  (chanserv_show_dnrs): Exploit the above.
  (chanserv_is_dnr): Use chanserv_find_dnrs(), removing lots of nearly
    duplicated code.
  (send_dnrs): New function to send unexpired DNRs from one dict.
  (cmd_noregister): Use send_dnrs() to merge duplicated code.
  (write_dnrs_helper): Remove expired DNRs here.
src/chanserv.c