Skip to content

Commit

Permalink
split oper:spy in to oper:spy_user and oper:spy_channel
Browse files Browse the repository at this point in the history
  • Loading branch information
jesopo committed Jun 10, 2022
1 parent 8e239de commit b1e9fac
Show file tree
Hide file tree
Showing 7 changed files with 9 additions and 8 deletions.
3 changes: 2 additions & 1 deletion include/s_newconf.h
Original file line number Diff line number Diff line change
Expand Up @@ -156,7 +156,8 @@ extern void cluster_generic(struct Client *, const char *, int cltype,
#define IsOperHiddenAdmin(x) (HasPrivilege((x), "oper:hidden_admin"))
#define IsOperAdmin(x) (HasPrivilege((x), "oper:admin") || HasPrivilege((x), "oper:hidden_admin"))
#define IsOperOperwall(x) (HasPrivilege((x), "oper:operwall"))
#define IsOperSpy(x) (HasPrivilege((x), "oper:spy"))
#define IsOperSpyChannel(x) (HasPrivilege((x), "oper:spy_channel"))
#define IsOperSpyUser(x) (HasPrivilege((x), "oper:spy_user"))
#define IsOperInvis(x) (HasPrivilege((x), "oper:hidden"))
#define IsOperRemoteBan(x) (HasPrivilege((x), "oper:remoteban"))
#define IsOperMassNotice(x) (HasPrivilege((x), "oper:mass_notice"))
Expand Down
2 changes: 1 addition & 1 deletion modules/core/m_mode.c
Original file line number Diff line number Diff line change
Expand Up @@ -85,7 +85,7 @@ m_mode(struct MsgBuf *msgbuf_p, struct Client *client_p, struct Client *source_p

dest = parv[1];

if(IsOperSpy(source_p) && *dest == '!')
if(IsOperSpyChannel(source_p) && *dest == '!')
{
dest++;
operspy = 1;
Expand Down
4 changes: 2 additions & 2 deletions modules/m_etrace.c
Original file line number Diff line number Diff line change
Expand Up @@ -236,7 +236,7 @@ m_chantrace(struct MsgBuf *msgbuf_p, struct Client *client_p, struct Client *sou

name = parv[1];

if(IsOperSpy(source_p) && parv[1][0] == '!')
if(IsOperSpyChannel(source_p) && parv[1][0] == '!')
{
name++;
operspy = 1;
Expand Down Expand Up @@ -347,7 +347,7 @@ mo_masktrace(struct MsgBuf *msgbuf_p, struct Client *client_p, struct Client *so
name = LOCAL_COPY(parv[1]);
collapse(name);

if(IsOperSpy(source_p) && parv[1][0] == '!')
if(IsOperSpyUser(source_p) && parv[1][0] == '!')
{
name++;
mask++;
Expand Down
2 changes: 1 addition & 1 deletion modules/m_list.c
Original file line number Diff line number Diff line change
Expand Up @@ -183,7 +183,7 @@ mo_list(struct MsgBuf *msgbuf_p, struct Client *client_p, struct Client *source_
args = LOCAL_COPY(parv[1]);
}

if (args && *args == '!' && IsOperSpy(source_p))
if (args && *args == '!' && IsOperSpyChannel(source_p))
{
args++;
report_operspy(source_p, "LIST", args);
Expand Down
2 changes: 1 addition & 1 deletion modules/m_scan.c
Original file line number Diff line number Diff line change
Expand Up @@ -187,7 +187,7 @@ scan_umodes(struct MsgBuf *msgbuf_p, struct Client *client_p, struct Client *sou
}
if (target_list == &global_client_list && list_users)
{
if (IsOperSpy(source_p))
if (IsOperSpyUser(source_p))
{
if (!ConfigFileEntry.operspy_dont_care_user_info)
{
Expand Down
2 changes: 1 addition & 1 deletion modules/m_topic.c
Original file line number Diff line number Diff line change
Expand Up @@ -74,7 +74,7 @@ m_topic(struct MsgBuf *msgbuf_p, struct Client *client_p, struct Client *source_

name = parv[1];

if(IsOperSpy(source_p) && parv[1][0] == '!')
if(IsOperSpyChannel(source_p) && parv[1][0] == '!')
{
name++;
operspy = 1;
Expand Down
2 changes: 1 addition & 1 deletion modules/m_whois.c
Original file line number Diff line number Diff line change
Expand Up @@ -181,7 +181,7 @@ do_whois(struct Client *client_p, struct Client *source_p, int parc, const char
if((p = strchr(nick, ',')))
*p = '\0';

if(IsOperSpy(source_p) && *nick == '!')
if(IsOperSpyUser(source_p) && *nick == '!')
{
operspy = 1;
nick++;
Expand Down

0 comments on commit b1e9fac

Please sign in to comment.