Implement chanroles, as discussed with nenolod.

The theory behind this is that services sends an ENCAP * GRANT #channel
UID :+flagspec message specifying the chanroles the user has. They are
mapped into flag bits and applied to the membership of the user. They
then are restricted or permitted to what they can do based on the
permissions mask regardless of rank.

For backwards compatibility, the default permission bit (without a GRANT
statement) allows a user to to anything an existing op can do ONLY if
they are an op.

Todo: make CHANROLE_STATUS work (the ability to apply +ov to people),
which is at the moment controlled by CHANROLE_MODE.
This commit is contained in:
Elizabeth Jennifer Myers 2011-07-06 13:35:11 -04:00
parent 0351022738
commit 8aabb973c0
8 changed files with 148 additions and 9 deletions

View file

@ -97,7 +97,7 @@ m_kick(struct Client *client_p, struct Client *source_p, int parc, const char *p
return 0;
}
if(get_channel_access(source_p, msptr) < CHFL_CHANOP)
if(get_channel_access(source_p, msptr, CHANROLE_KICK) < CHFL_CHANOP)
{
if(MyConnect(source_p))
{