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.
This commit is contained in:
parent
d1d0b0a414
commit
e1a68c721d
4 changed files with 121 additions and 71 deletions
|
@ -174,6 +174,8 @@ extern void putcontact(struct natstr *np, natid them, int contact);
|
|||
extern void agecontact(struct natstr *np);
|
||||
extern int influx(struct natstr *np);
|
||||
|
||||
extern struct natstr *nat_reset(struct natstr *, enum nat_status, coord, coord);
|
||||
|
||||
extern int grant_btus(struct natstr *, int );
|
||||
|
||||
/* nation flags */
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue