if((p = strchr(parv[1], '@')) == NULL)
{
- if((target_p = find_person(client_p, parv[1])) != NULL)
+ target_p = find_person(client_p, parv[1]);
+ if (target_p == NULL)
{
- if(MyConnect(target_p))
- {
- if(HasUMode(target_p, UMODE_OPER))
- {
- sendto_one(source_p, form_str(ERR_NOPRIVS),
- me.name, source_p->name, "CAPTURE");
- return;
- }
-
- if (!IsCapturedLevel(target_p, type))
- {
- sendto_snomask(SNO_ALL, L_ALL,
- "Captured %s (%s@%s) [%s] type: %s", target_p->name,
- target_p->username, target_p->realhost, target_p->info, level);
- SetCapturedLevel(target_p, type);
- }
+ sendto_one(source_p, form_str(ERR_NOSUCHNICK),
+ me.name, source_p->name, parv[1]);
+ return;
+ }
- sendto_one(source_p, form_str(RPL_ISCAPTURED),
- me.name, source_p->name, target_p->name);
+ if (MyClient(source_p))
+ {
+ if (HasUMode(target_p, UMODE_OPER))
+ {
+ sendto_one(source_p, form_str(ERR_NOPRIVS),
+ me.name, source_p->name, "CAPTURE");
+ return;
}
- else if (target_p->from != client_p)
+ }
+
+ if (!MyClient(target_p))
+ {
+ if (target_p->from != client_p)
sendto_one(target_p, ":%s CAPTURE %s %s",
ID_or_name(source_p, target_p), ID_or_name(target_p, target_p), level);
+ return;
}
- else
- sendto_one(source_p, form_str(ERR_NOSUCHNICK),
- me.name, source_p->name, parv[1]);
+
+ if (!IsCapturedLevel(target_p, type))
+ {
+ sendto_snomask(SNO_ALL, L_ALL,
+ "Captured %s (%s@%s) [%s] type: %s", target_p->name,
+ target_p->username, target_p->realhost, target_p->info, level);
+ SetCapturedLevel(target_p, type);
+ }
+
+ sendto_one(source_p, form_str(RPL_ISCAPTURED),
+ me.name, source_p->name, target_p->name);
}
else
{