#include "hook.h"
#include "client.h"
#include "hash.h"
-#include "common.h"
#include "hash.h"
#include "match.h"
#include "ircd.h"
{
if(!irccmp(parv[1], "-full"))
do_etrace_full(source_p);
-#ifdef RB_IPV6
else if(!irccmp(parv[1], "-v6"))
do_etrace(source_p, 0, 1);
else if(!irccmp(parv[1], "-v4"))
do_etrace(source_p, 1, 0);
-#endif
else
{
struct Client *target_p = find_named_person(parv[1]);
target_p->servptr->name,
get_id(target_p, target_p));
else
+ {
do_single_etrace(source_p, target_p);
+ sendto_one_numeric(source_p, RPL_ENDOFTRACE, form_str(RPL_ENDOFTRACE), target_p->name);
+ }
}
else
sendto_one_numeric(source_p, ERR_NOSUCHNICK,
{
target_p = ptr->data;
-#ifdef RB_IPV6
if((!ipv4 && GET_SS_FAMILY(&target_p->localClient->ip) == AF_INET) ||
(!ipv6 && GET_SS_FAMILY(&target_p->localClient->ip) == AF_INET6))
continue;
-#endif
sendto_one(source_p, form_str(RPL_ETRACE),
me.name, source_p->name,
- IsOper(target_p) ? "Oper" : "User",
+ SeesOper(target_p, source_p) ? "Oper" : "User",
get_client_class(target_p),
target_p->name, target_p->username, target_p->host,
show_ip(source_p, target_p) ? target_p->sockhost : "255.255.255.255",
if(!show_ip(source_p, target_p))
sendto_one(source_p, form_str(RPL_ETRACEFULL),
me.name, source_p->name,
- IsOper(target_p) ? "Oper" : "User",
+ SeesOper(target_p, source_p) ? "Oper" : "User",
get_client_class(target_p),
target_p->name, target_p->username, target_p->host,
"255.255.255.255", "<hidden> <hidden>", target_p->info);
else
sendto_one(source_p, form_str(RPL_ETRACEFULL),
me.name, source_p->name,
- IsOper(target_p) ? "Oper" : "User",
+ SeesOper(target_p, source_p) ? "Oper" : "User",
get_client_class(target_p),
target_p->name, target_p->username,
target_p->host, target_p->sockhost,
sendto_one(source_p, form_str(RPL_ETRACE),
me.name, source_p->name,
- IsOper(target_p) ? "Oper" : "User",
+ SeesOper(target_p, source_p) ? "Oper" : "User",
/* class field -- pretend its server.. */
target_p->servptr->name,
target_p->name, target_p->username, target_p->host,
sendto_one(source_p, form_str(RPL_ETRACE),
me.name, source_p->name,
- IsOper(target_p) ? "Oper" : "User",
+ SeesOper(target_p, source_p) ? "Oper" : "User",
/* class field -- pretend its server.. */
target_p->servptr->name,
target_p->name, target_p->username, target_p->host,
const char *parv[])
{
char *name, *username, *hostname, *gecos;
- const char *mask;
- int operspy = 0;
- mask = parv[1];
name = LOCAL_COPY(parv[1]);
collapse(name);
- if(IsOperSpy(source_p) && parv[1][0] == '!')
- {
- name++;
- mask++;
- operspy = 1;
- }
-
if(parc > 2 && !EmptyString(parv[2]))
{
gecos = LOCAL_COPY(parv[2]);
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);
- } else
- match_masktrace(source_p, &lclient_list, username, hostname, name, gecos);
-
+ match_masktrace(source_p, &global_client_list, username, hostname, name, gecos);
sendto_one_numeric(source_p, RPL_ENDOFTRACE, form_str(RPL_ENDOFTRACE), me.name);
}