diff --git a/include/struct.h b/include/struct.h index de0e59a00..288790108 100644 --- a/include/struct.h +++ b/include/struct.h @@ -395,8 +395,7 @@ typedef enum ClientStatus { /** @} */ -#define SNO_DEFOPER "+kscfvGqobS" -#define SNO_DEFUSER "+ks" +#define OPER_SNOMASKS "+bBcdfkqsSoO" #define SEND_UMODES (SendUmodes) #define ALL_UMODES (AllUmodes) diff --git a/src/conf.c b/src/conf.c index bdf9b2d1c..64b6cba5c 100644 --- a/src/conf.c +++ b/src/conf.c @@ -1635,7 +1635,7 @@ void config_setdefaultsettings(Configuration *i) { char tmp[512]; - safe_strdup(i->oper_snomask, SNO_DEFOPER); + safe_strdup(i->oper_snomask, OPER_SNOMASKS); i->ident_read_timeout = 7; i->ident_connect_timeout = 3; i->ban_version_tkl_time = 86400; /* 1d */ diff --git a/src/modules/mode.c b/src/modules/mode.c index d56800380..16ebc3f13 100644 --- a/src/modules/mode.c +++ b/src/modules/mode.c @@ -1172,10 +1172,10 @@ CMD_FUNC(_cmd_umode) goto def; } } - if (what == MODE_ADD) + if ((what == MODE_ADD) && IsOper(client)) { if (parc < 4) - set_snomask(client, IsOper(client) ? SNO_DEFOPER : SNO_DEFUSER); + set_snomask(client, OPER_SNOMASKS); else set_snomask(client, parv[3]); goto def;