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_EOPMOD 0x100000 /* supports EOPMOD (ext +z + ext topic) */
#define CAP_BAN 0x200000 /* supports propagated bans */ #define CAP_BAN 0x200000 /* supports propagated bans */
#define CAP_MLOCK 0x400000 /* supports MLOCK messages */ #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 | \ #define CAP_MASK (CAP_QS | CAP_EX | CAP_CHW | \
CAP_IE | CAP_KLN | CAP_SERVICE |\ CAP_IE | CAP_KLN | CAP_SERVICE |\
CAP_CLUSTER | CAP_ENCAP | \ CAP_CLUSTER | CAP_ENCAP | \
CAP_ZIP | CAP_KNOCK | CAP_UNKLN | \ CAP_ZIP | CAP_KNOCK | CAP_UNKLN | \
CAP_RSFNC | CAP_SAVE | CAP_EUID | CAP_EOPMOD | \ CAP_RSFNC | CAP_SAVE | CAP_EUID | CAP_EOPMOD | \
CAP_BAN | CAP_MLOCK) CAP_BAN | CAP_MLOCK | CAP_QAOHV)
#ifdef HAVE_LIBZ #ifdef HAVE_LIBZ
#define CAP_ZIP_SUPPORTED CAP_ZIP #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 * extra argument to "PASS" takes care of checking that. -orabidoo
*/ */
struct Capability captab[] = { struct Capability captab[] = {
/* name cap */ /*name cap required?*/
{ "QS", CAP_QS }, { "QS", CAP_QS, 1 },
{ "EX", CAP_EX }, { "EX", CAP_EX, 1 },
{ "CHW", CAP_CHW}, { "CHW", CAP_CHW, 0 },
{ "IE", CAP_IE}, { "IE", CAP_IE, 0 },
{ "KLN", CAP_KLN}, { "KLN", CAP_KLN, 0 },
{ "KNOCK", CAP_KNOCK}, { "KNOCK", CAP_KNOCK, 1 },
{ "ZIP", CAP_ZIP}, { "ZIP", CAP_ZIP, 0 },
{ "TB", CAP_TB}, { "TB", CAP_TB, 1 },
{ "UNKLN", CAP_UNKLN}, { "UNKLN", CAP_UNKLN, 0 },
{ "CLUSTER", CAP_CLUSTER}, { "CLUSTER",CAP_CLUSTER, 1 },
{ "ENCAP", CAP_ENCAP }, { "ENCAP", CAP_ENCAP, 1 },
{ "SERVICES", CAP_SERVICE }, { "SERVICES",CAP_SERVICE, 1 },
{ "RSFNC", CAP_RSFNC }, { "RSFNC", CAP_RSFNC, 1 },
{ "SAVE", CAP_SAVE }, { "SAVE", CAP_SAVE, 0 },
{ "EUID", CAP_EUID }, { "EUID", CAP_EUID, 1 },
{ "EOPMOD", CAP_EOPMOD }, { "EOPMOD", CAP_EOPMOD, 0 },
{ "BAN", CAP_BAN }, { "BAN", CAP_BAN, 1 },
{ "MLOCK", CAP_MLOCK }, { "MLOCK", CAP_MLOCK, 1 },
{0, 0} { "QAOHV", CAP_QAOHV, 1 },
{ 0, 0, 0 }
}; };
static CNCB serv_connect_callback; static CNCB serv_connect_callback;