Deny linking with non-qaohv servers

Also make the captab look pretty
This commit is contained in:
Sam Dodrill 2015-02-19 13:26:29 -08:00
parent 49790bbac5
commit 1da821dcde
2 changed files with 23 additions and 21 deletions

View File

@ -72,13 +72,14 @@ struct Capability {
#define CAP_EOPMOD 0x100000 /* supports EOPMOD (ext +z + ext topic) */
#define CAP_BAN 0x200000 /* supports propagated bans */
#define CAP_MLOCK 0x400000 /* supports MLOCK messages */
#define CAP_QAOHV 0x800000 /* uses +q for owner and +y for quiet */
#define CAP_MASK (CAP_QS | CAP_EX | CAP_CHW | \
CAP_IE | CAP_KLN | CAP_SERVICE |\
CAP_CLUSTER | CAP_ENCAP | \
CAP_ZIP | CAP_KNOCK | CAP_UNKLN | \
CAP_RSFNC | CAP_SAVE | CAP_EUID | CAP_EOPMOD | \
CAP_BAN | CAP_MLOCK)
CAP_BAN | CAP_MLOCK | CAP_QAOHV)
#ifdef HAVE_LIBZ
#define CAP_ZIP_SUPPORTED CAP_ZIP

View File

@ -71,26 +71,27 @@ static char buf[BUFSIZE];
* extra argument to "PASS" takes care of checking that. -orabidoo
*/
struct Capability captab[] = {
/* name cap */
{ "QS", CAP_QS },
{ "EX", CAP_EX },
{ "CHW", CAP_CHW},
{ "IE", CAP_IE},
{ "KLN", CAP_KLN},
{ "KNOCK", CAP_KNOCK},
{ "ZIP", CAP_ZIP},
{ "TB", CAP_TB},
{ "UNKLN", CAP_UNKLN},
{ "CLUSTER", CAP_CLUSTER},
{ "ENCAP", CAP_ENCAP },
{ "SERVICES", CAP_SERVICE },
{ "RSFNC", CAP_RSFNC },
{ "SAVE", CAP_SAVE },
{ "EUID", CAP_EUID },
{ "EOPMOD", CAP_EOPMOD },
{ "BAN", CAP_BAN },
{ "MLOCK", CAP_MLOCK },
{0, 0}
/*name cap required?*/
{ "QS", CAP_QS, 1 },
{ "EX", CAP_EX, 1 },
{ "CHW", CAP_CHW, 0 },
{ "IE", CAP_IE, 0 },
{ "KLN", CAP_KLN, 0 },
{ "KNOCK", CAP_KNOCK, 1 },
{ "ZIP", CAP_ZIP, 0 },
{ "TB", CAP_TB, 1 },
{ "UNKLN", CAP_UNKLN, 0 },
{ "CLUSTER",CAP_CLUSTER, 1 },
{ "ENCAP", CAP_ENCAP, 1 },
{ "SERVICES",CAP_SERVICE, 1 },
{ "RSFNC", CAP_RSFNC, 1 },
{ "SAVE", CAP_SAVE, 0 },
{ "EUID", CAP_EUID, 1 },
{ "EOPMOD", CAP_EOPMOD, 0 },
{ "BAN", CAP_BAN, 1 },
{ "MLOCK", CAP_MLOCK, 1 },
{ "QAOHV", CAP_QAOHV, 1 },
{ 0, 0, 0 }
};
static CNCB serv_connect_callback;