diff --git a/include/channel.h b/include/channel.h index 21cefa7c..bb1da83f 100644 --- a/include/channel.h +++ b/include/channel.h @@ -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)) diff --git a/ircd/chmode.c b/ircd/chmode.c index 7b7dc552..8ac45e55 100644 --- a/ircd/chmode.c +++ b/ircd/chmode.c @@ -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;