X-Git-Url: http://git.pk910.de/?p=ircu2.10.12-pk.git;a=blobdiff_plain;f=ircd%2Fm_cap.c;fp=ircd%2Fm_cap.c;h=a2cc79947d45ba41f0a1719a183685c6edc64002;hp=2443c42f714d9f0046b470f9b177234e359b4717;hb=be7c44e61bdc795a72b4c7478ea302b791223927;hpb=c2ad630afaab5353b2656f6cd5d591f8a2488692 diff --git a/ircd/m_cap.c b/ircd/m_cap.c index 2443c42..a2cc799 100644 --- a/ircd/m_cap.c +++ b/ircd/m_cap.c @@ -260,10 +260,15 @@ cap_ack(struct Client *sptr, const char *caplist) (neg ? HasCap(sptr, cap->cap) : !HasCap(sptr, cap->cap))) /* uh... */ continue; - if (neg) /* set or clear the active capability... */ + if (neg) { /* set or clear the active capability... */ + if (cap->flags & CAPFL_STICKY) + continue; /* but don't clear sticky capabilities */ CapClr(cli_active(sptr), cap->cap); - else + } else { + if (cap->flags & CAPFL_PROHIBIT) + continue; /* and don't set prohibited ones */ CapSet(cli_active(sptr), cap->cap); + } } return 0;