From efc63dff8127f00aedb4e143796e15dd3bc5b0ea Mon Sep 17 00:00:00 2001 From: Bram Matthys Date: Mon, 22 Jun 2015 19:29:32 +0200 Subject: [PATCH] Permit halfops to set more modes than before. The idea is halfops should be able to help out in case of a flood but not be able to change any 'policy decission' modes such as +G, +S, +c, +s. The following modes are now permitted to halfops: +iklmntMKNCR (was: +ikmnt) --- src/channel.c | 2 +- src/modules/chanmodes/noctcp.c | 2 +- src/modules/chanmodes/noknock.c | 2 +- src/modules/chanmodes/nonickchange.c | 2 +- src/modules/chanmodes/regonly.c | 2 +- src/modules/chanmodes/regonlyspeak.c | 2 +- 6 files changed, 6 insertions(+), 6 deletions(-) diff --git a/src/channel.c b/src/channel.c index 70ab4240f..69b7812b0 100644 --- a/src/channel.c +++ b/src/channel.c @@ -73,7 +73,7 @@ MODVAR char modebuf[BUFSIZE], parabuf[BUFSIZE]; #define MODESYS_LINKOK /* We do this for a TEST */ aCtab cFlagTab[] = { - {MODE_LIMIT, 'l', 0, 1}, + {MODE_LIMIT, 'l', 1, 1}, {MODE_VOICE, 'v', 1, 1}, {MODE_HALFOP, 'h', 0, 1}, {MODE_CHANOP, 'o', 0, 1}, diff --git a/src/modules/chanmodes/noctcp.c b/src/modules/chanmodes/noctcp.c index ac2120aa7..dbb69dacd 100644 --- a/src/modules/chanmodes/noctcp.c +++ b/src/modules/chanmodes/noctcp.c @@ -68,7 +68,7 @@ CmodeInfo req; memset(&req, 0, sizeof(req)); req.paracount = 0; req.flag = 'C'; - req.is_ok = extcmode_default_requirechop; + req.is_ok = extcmode_default_requirehalfop; CmodeAdd(modinfo->handle, req, &EXTCMODE_NOCTCP); HookAddPCharEx(modinfo->handle, HOOKTYPE_PRE_CHANMSG, noctcp_prechanmsg); diff --git a/src/modules/chanmodes/noknock.c b/src/modules/chanmodes/noknock.c index 9069ec2eb..1148196ee 100644 --- a/src/modules/chanmodes/noknock.c +++ b/src/modules/chanmodes/noknock.c @@ -122,6 +122,6 @@ DLLFUNC int noknock_mode_allow(aClient *cptr, aChannel *chptr, char mode, char * return EX_DENY; } - return extcmode_default_requirechop(cptr,chptr,mode,para,checkt,what); + return extcmode_default_requirehalfop(cptr,chptr,mode,para,checkt,what); } diff --git a/src/modules/chanmodes/nonickchange.c b/src/modules/chanmodes/nonickchange.c index 4297cba5d..6ba0f16d3 100644 --- a/src/modules/chanmodes/nonickchange.c +++ b/src/modules/chanmodes/nonickchange.c @@ -67,7 +67,7 @@ CmodeInfo req; memset(&req, 0, sizeof(req)); req.paracount = 0; req.flag = 'N'; - req.is_ok = extcmode_default_requirechop; + req.is_ok = extcmode_default_requirehalfop; CmodeAdd(modinfo->handle, req, &EXTCMODE_NONICKCHANGE); HookAddEx(modinfo->handle, HOOKTYPE_CHAN_PERMIT_NICK_CHANGE, nonickchange_check); diff --git a/src/modules/chanmodes/regonly.c b/src/modules/chanmodes/regonly.c index ace697992..3186b6025 100644 --- a/src/modules/chanmodes/regonly.c +++ b/src/modules/chanmodes/regonly.c @@ -68,7 +68,7 @@ CmodeInfo req; memset(&req, 0, sizeof(req)); req.paracount = 0; req.flag = 'R'; - req.is_ok = extcmode_default_requirechop; + req.is_ok = extcmode_default_requirehalfop; CmodeAdd(modinfo->handle, req, &EXTCMODE_REGONLY); HookAddEx(modinfo->handle, HOOKTYPE_CAN_JOIN, regonly_check); diff --git a/src/modules/chanmodes/regonlyspeak.c b/src/modules/chanmodes/regonlyspeak.c index b9d30e406..8c42aae2e 100644 --- a/src/modules/chanmodes/regonlyspeak.c +++ b/src/modules/chanmodes/regonlyspeak.c @@ -69,7 +69,7 @@ DLLFUNC int MOD_INIT(regonlyspeak)(ModuleInfo *modinfo) memset(&req, 0, sizeof(req)); req.paracount = 0; req.flag = 'M'; - req.is_ok = extcmode_default_requirechop; + req.is_ok = extcmode_default_requirehalfop; CmodeAdd(modinfo->handle, req, &EXTCMODE_REGONLYSPEAK); HookAddEx(modinfo->handle, HOOKTYPE_CAN_SEND, regonlyspeak_can_send);