chmode: Get elevated access for op-only queries

This commit is contained in:
Ed Kellett 2020-11-05 22:19:00 +00:00
parent 04952c32ad
commit ea41b24fd4
2 changed files with 3 additions and 0 deletions

View file

@ -191,6 +191,7 @@ typedef int (*ExtbanFunc)(const char *data, struct Client *client_p,
#define MODE_QUERY 0
#define MODE_ADD 1
#define MODE_DEL -1
#define MODE_OP_QUERY 2
#define SecretChannel(x) ((x) && ((x)->mode.mode & MODE_SECRET))
#define HiddenChannel(x) ((x) && ((x)->mode.mode & MODE_PRIVATE))

View file

@ -1457,6 +1457,8 @@ set_channel_mode(struct Client *client_p, struct Client *source_p,
if (effective_dir != MODE_QUERY && access_dir == MODE_QUERY)
access_dir = effective_dir;
if (effective_dir == MODE_QUERY && cm->flags & CHM_OPS_QUERY)
access_dir = MODE_OP_QUERY;
ms->cm = cm;
ms->dir = effective_dir;