Underpinnings for realm.list enhancements

Replace the per-realm array of servers with a per-realm array of
struct _ZRealm_server, so that we can have additional information
associated with each server.

Additionally, introduce the concept that not every server in a realm's
list is necessarily a suitable place to send notices.  This means that
when selecting a server, we may need to skip ineligible entries.
realm.list nosend flag support

From:    Derrick J Brashear <shadow@dementia.org>
To:      zephyr-peers@dementia.org
Subject: [zephyr-peers] last time, i hope: new zephyr server
Date:    Thu, 27 Mar 2003 21:44:02 -0500 (EST)

[...]

-enhanced realm.list semantics. [...] if a server hostname is prefixed with /,
it indicates we can receive messages from the realm from this server, but
should not send to it.
Turn dontsend into a bitfield
Introduce usable flag on other-realm servers

Introduce a new per-realm-server 'usable' flag, which indicates the entry has
been fully initialized and can be used.  Routines which select a server or
attempt to find one based on its address should ignore servers on which the
usable flag is not set.

This will allow the introduction of features which require recording servers
which are not yet usable, such as asynchronous server name resolution.
Return _ZRealm_server from get_realm_lists()

Instead of returning an array of server hostname strings for each realm,
get_realm_lists() now returns an array of struct _ZRealm_server for each
realm.  This allows it to return additional per-server information found
in the realm.list file, such as the nosend flag, and simplifies creation
of the final per-realm server list.

This change will make it easier to use interned strings for server names,
which will eventually enable efficient processing of updates to server
configuration when the realm.list file is reloaded.
Use interned strings for realm and server names

Use interned strings instead of strdup() and fixed-size arrays for names
of other realms and their servers.  This gives immediate improvement in
the form of doing fewer string compares when loading the realm.list,
plus the obvious benefit of eliminating some fixed char arrays.  It also
paves the way for efficiently identifying existing realms and servers to
be updated when reloading the realm.list.
realm_get_realm_by_name_string()
Make otherrealms be an array of pointers

The server keeps pointers to realms in non-ephemeral data structures, such
as triplet subscriber lists.  Thus, we cannot move existing realms around
in memory without causing data corruption.  However, dynamic reloading of
the realm.list means new realms can appear, which sooner or later will
mean reallocating the otherrealms array to make room for more realms.

Therefore, to allow otherrealms to be reallocated without changing the
addresses of existing realms, otherrealms is converted from an array of
realms to an array of pointers to realms.
Support calling realm_init() more than once

This makes realm_init() augment the existing other-realm array instead
of replacing it wholesale, which makes it safe to call more than once.
During the first call in which the realm.list file exists and contains at
least one realm, the otherrealms array will be initialized with entries
for all configured realms.  During subsequent calls, any new realms will
be added, growing the array as necessary.  For now, entries for existing
realms are not updated in any way.
Abstract realm server usability test

Whether a particular server is usable currently depends only on whether we
have successfully obtained its IP address.  However, eventually it will also
depend on additional factors such as whether the server has been deleted from
the realm.list.  To ease that transition, replace the 'usable' flag with a
'got_addr' flag (which is set when the address lookup succeeds), and add a
new function to test whether a server is usable.
Abstract out realm server hostname lookup

The task of looking up a server's hostname is moved into a separate
function, which will make things cleaner when we start doing so in more
than one place.
Update existing realms during realm.list reload
Reload other realms on SIGHUP/reset
Dewarn realm.list enhancements
server: include realm-server flags in dump
remove a reference to 2.0
Substitute paths into man pages

Generate the man pages for zwgc, zctl, zhm, and zephyrd at build time,
so they can refer to the paths actually used instead of whatever was
used on Athena in the 1980's.
handle generated man pages with offset builds
Make _sure_ we're not making assumptions about ZNotice_ts on the stack
Add opstaff_check()

Add a function to check whether a sender is on the opstaff ACL, which lives
in $sysconfdir/zephyr/acl/opstaff.acl.  This is in preparation for a number
of features which grant additional access to people on that ACL.