reject: Replace getrejects() by nat_accepts()
All callers of getrejects() also check whether the sender is a deity. Factor out the common code into nat_accepts(), and drop getrejects(). Signed-off-by: Markus Armbruster <armbru@pond.sub.org>
This commit is contained in:
parent
5983fa2f6c
commit
9d153f547c
8 changed files with 12 additions and 16 deletions
|
@ -90,9 +90,10 @@ relations_with(natid us, natid them)
|
|||
}
|
||||
|
||||
int
|
||||
getrejects(natid them, struct natstr *np)
|
||||
nat_accepts(struct natstr *np, natid them, int what)
|
||||
{
|
||||
return np->nat_rejects[them];
|
||||
return getnatp(them)->nat_stat == STAT_GOD
|
||||
|| !(np->nat_rejects[them] & what);
|
||||
}
|
||||
|
||||
void
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue