chmode: Get elevated access for op-only queries
This commit is contained in:
parent
04952c32ad
commit
ea41b24fd4
2 changed files with 3 additions and 0 deletions
|
@ -191,6 +191,7 @@ typedef int (*ExtbanFunc)(const char *data, struct Client *client_p,
|
||||||
#define MODE_QUERY 0
|
#define MODE_QUERY 0
|
||||||
#define MODE_ADD 1
|
#define MODE_ADD 1
|
||||||
#define MODE_DEL -1
|
#define MODE_DEL -1
|
||||||
|
#define MODE_OP_QUERY 2
|
||||||
|
|
||||||
#define SecretChannel(x) ((x) && ((x)->mode.mode & MODE_SECRET))
|
#define SecretChannel(x) ((x) && ((x)->mode.mode & MODE_SECRET))
|
||||||
#define HiddenChannel(x) ((x) && ((x)->mode.mode & MODE_PRIVATE))
|
#define HiddenChannel(x) ((x) && ((x)->mode.mode & MODE_PRIVATE))
|
||||||
|
|
|
@ -1457,6 +1457,8 @@ set_channel_mode(struct Client *client_p, struct Client *source_p,
|
||||||
|
|
||||||
if (effective_dir != MODE_QUERY && access_dir == MODE_QUERY)
|
if (effective_dir != MODE_QUERY && access_dir == MODE_QUERY)
|
||||||
access_dir = effective_dir;
|
access_dir = effective_dir;
|
||||||
|
if (effective_dir == MODE_QUERY && cm->flags & CHM_OPS_QUERY)
|
||||||
|
access_dir = MODE_OP_QUERY;
|
||||||
|
|
||||||
ms->cm = cm;
|
ms->cm = cm;
|
||||||
ms->dir = effective_dir;
|
ms->dir = effective_dir;
|
||||||
|
|
Loading…
Reference in a new issue