diff --git a/doc/ircd.conf.example b/doc/ircd.conf.example index 705a0d6d..45f45367 100644 --- a/doc/ircd.conf.example +++ b/doc/ircd.conf.example @@ -236,7 +236,7 @@ auth { * means they must be defined before operator {}. */ privset "local_op" { - privs = oper:general, auspex:oper, oper:privs, oper:local_kill, oper:operwall; + privs = oper:general, auspex:oper, oper:privs, oper:testline, oper:local_kill, oper:operwall; }; privset "server_bot" { diff --git a/doc/reference.conf b/doc/reference.conf index 6a268613..946732d8 100644 --- a/doc/reference.conf +++ b/doc/reference.conf @@ -434,6 +434,7 @@ privset "local_op" { * with +o in older releases * auspex:oper: allows the oper to see through oper hiding * oper:privs: allows /stats o/O and seeing privset in /whois + * oper:testline: allows /testline and /testgecos * oper:local_kill: allows local users to be /KILL'd * oper:global_kill: allows local and remote users to be /KILL'd * oper:routing: allows remote SQUIT and CONNECT @@ -459,7 +460,7 @@ privset "local_op" { * oper:mass_notice: allows sending wallops and mass notices * oper:grant: allows using the GRANT command */ - privs = oper:general, auspex:oper, oper:privs, oper:local_kill, oper:operwall; + privs = oper:general, auspex:oper, oper:privs, oper:testline, oper:local_kill, oper:operwall; }; privset "server_bot" { diff --git a/modules/m_testline.c b/modules/m_testline.c index 7aa27a88..1f78d5d4 100644 --- a/modules/m_testline.c +++ b/modules/m_testline.c @@ -75,6 +75,13 @@ mo_testline(struct MsgBuf *msgbuf_p, struct Client *client_p, struct Client *sou char *puser, *phost, *reason, *operreason; char reasonbuf[BUFSIZE]; + if (!HasPrivilege(source_p, "oper:testline")) + { + sendto_one(source_p, form_str(ERR_NOPRIVS), + me.name, source_p->name, "testline"); + return; + } + mask = LOCAL_COPY(parv[1]); if (IsChannelName(mask)) @@ -231,6 +238,13 @@ mo_testgecos(struct MsgBuf *msgbuf_p, struct Client *client_p, struct Client *so { struct ConfItem *aconf; + if (!HasPrivilege(source_p, "oper:testline")) + { + sendto_one(source_p, form_str(ERR_NOPRIVS), + me.name, source_p->name, "testline"); + return; + } + if(!(aconf = find_xline(parv[1], 0))) { sendto_one(source_p, form_str(RPL_NOTESTLINE),