global masktrace doesn't need to be an operspy action

This commit is contained in:
Jess Porter 2022-07-01 00:07:02 +01:00 committed by GitHub
parent 9d2e66c08d
commit 12cee8ab78
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -340,20 +340,10 @@ mo_masktrace(struct MsgBuf *msgbuf_p, struct Client *client_p, struct Client *so
const char *parv[]) const char *parv[])
{ {
char *name, *username, *hostname, *gecos; char *name, *username, *hostname, *gecos;
const char *mask;
int operspy = 0;
mask = parv[1];
name = LOCAL_COPY(parv[1]); name = LOCAL_COPY(parv[1]);
collapse(name); collapse(name);
if(IsOperSpy(source_p) && parv[1][0] == '!')
{
name++;
mask++;
operspy = 1;
}
if(parc > 2 && !EmptyString(parv[2])) if(parc > 2 && !EmptyString(parv[2]))
{ {
gecos = LOCAL_COPY(parv[2]); gecos = LOCAL_COPY(parv[2]);
@ -383,21 +373,6 @@ mo_masktrace(struct MsgBuf *msgbuf_p, struct Client *client_p, struct Client *so
return; return;
} }
if(operspy) {
if (!ConfigFileEntry.operspy_dont_care_user_info)
{
char buf[512];
rb_strlcpy(buf, mask, sizeof(buf));
if(!EmptyString(gecos)) {
rb_strlcat(buf, " ", sizeof(buf));
rb_strlcat(buf, gecos, sizeof(buf));
}
report_operspy(source_p, "MASKTRACE", buf);
}
match_masktrace(source_p, &global_client_list, username, hostname, name, gecos); match_masktrace(source_p, &global_client_list, username, hostname, name, gecos);
} else
match_masktrace(source_p, &lclient_list, username, hostname, name, gecos);
sendto_one_numeric(source_p, RPL_ENDOFTRACE, form_str(RPL_ENDOFTRACE), me.name); sendto_one_numeric(source_p, RPL_ENDOFTRACE, form_str(RPL_ENDOFTRACE), me.name);
} }