chanroles: grant initial set of flags to people added to a channel with CHFL_CHANOP.
this allows us to, later on, add a hook that will enable us to disable channel ops entirely without causing permissions revocation.
This commit is contained in:
parent
6d8ec56083
commit
ae79dab6ae
2 changed files with 6 additions and 1 deletions
|
@ -197,6 +197,8 @@ typedef int (*ExtbanFunc)(const char *data, struct Client *client_p,
|
|||
#define CHANROLE_MODE 0x010 /* Can change modes */
|
||||
#define CHANROLE_TOPIC 0x020 /* Can change topic */
|
||||
|
||||
#define CHANROLE_INITIAL (CHANROLE_KICK | CHANROLE_STATUS | CHANROLE_GRANT | CHANROLE_MODE | CHANROLE_TOPIC)
|
||||
|
||||
#define SecretChannel(x) ((x) && ((x)->mode.mode & MODE_SECRET))
|
||||
#define HiddenChannel(x) ((x) && ((x)->mode.mode & MODE_PRIVATE))
|
||||
#define PubChannel(x) ((!x) || ((x)->mode.mode &\
|
||||
|
|
|
@ -237,7 +237,10 @@ add_user_to_channel(struct Channel *chptr, struct Client *client_p, int flags)
|
|||
msptr->flags = flags;
|
||||
|
||||
/* Default to no chanroles until services says we're something else */
|
||||
msptr->roles = CHANROLE_UNSET;
|
||||
if (flags == CHFL_CHANOP)
|
||||
msptr->roles = CHANROLE_INITIAL;
|
||||
else
|
||||
msptr->roles = CHANROLE_UNSET;
|
||||
|
||||
rb_dlinkAdd(msptr, &msptr->usernode, &client_p->user->channel);
|
||||
rb_dlinkAdd(msptr, &msptr->channode, &chptr->members);
|
||||
|
|
Loading…
Reference in a new issue