]> git.pond.sub.org Git - empserver/commit
Factor common code out of add() and new() into nat_reset()
authorMarkus Armbruster <armbru@pond.sub.org>
Wed, 5 Mar 2008 21:21:08 +0000 (22:21 +0100)
committerMarkus Armbruster <armbru@pond.sub.org>
Fri, 14 Mar 2008 19:25:43 +0000 (20:25 +0100)
commite1a68c721dc2e4275b2956e2126203ea7a910462
tree6da7f0cf3c2e0866659021c8aa6710f49e3edcd9
parentd1d0b0a414c28c82548af88780417d86f40479a7
Factor common code out of add() and new() into nat_reset()

The common nation wipe code is not quite identical, and it doesn't
wipe the nation thoroughly enough.  The new code does.

Changes to both commands:

* Wipe nat_update, nat_ann, nat_access, and nat_contact.  Bug: should
  set nat_ann to the number of announcements.

Changes to add command:

* Don't wipe for status active and god.  Before, nat_relate and
  nat_flags where wiped then.

Changes to newcap command:

* Wipe nat_hostaddr, nat_hostname, nat_userid, nat_dayno, nat_minused,
  nat_reserve, nat_last_login, nat_last_logout, nat_newstim,
  nat_annotim, nat_relate, nat_rejects, nat_flags.
include/nat.h
src/lib/commands/add.c
src/lib/commands/new.c
src/lib/subs/natsub.c [new file with mode: 0644]