| 172 |
|
AddFlag(to, FLAGS_KILLED); |
| 173 |
|
|
| 174 |
|
if (IsClient(from)) |
| 175 |
< |
sendto_one(from, form_str(ERR_GHOSTEDCLIENT), |
| 176 |
< |
me.name, from->name, to->name, to->username, |
| 177 |
< |
to->host, to->from); |
| 175 |
> |
sendto_one_numeric(from, &me, ERR_GHOSTEDCLIENT, to->name, |
| 176 |
> |
to->username, to->host, to->from); |
| 177 |
|
|
| 178 |
|
exit_client(to, &me, "Ghosted client"); |
| 179 |
|
return; |
| 326 |
|
va_end(args); |
| 327 |
|
|
| 328 |
|
send_message(to, buffer); |
| 329 |
+ |
|
| 330 |
+ |
dbuf_ref_free(buffer); |
| 331 |
+ |
} |
| 332 |
+ |
|
| 333 |
+ |
void |
| 334 |
+ |
sendto_one_numeric(struct Client *to, struct Client *from, enum irc_numerics numeric, ...) |
| 335 |
+ |
{ |
| 336 |
+ |
struct dbuf_block *buffer; |
| 337 |
+ |
va_list args; |
| 338 |
+ |
const char *dest; |
| 339 |
+ |
|
| 340 |
+ |
if (to->from != NULL) |
| 341 |
+ |
to = to->from; |
| 342 |
+ |
if (IsDead(to)) |
| 343 |
+ |
return; |
| 344 |
+ |
|
| 345 |
+ |
dest = ID_or_name(to, to); |
| 346 |
+ |
if (EmptyString(dest)) |
| 347 |
+ |
dest = "*"; |
| 348 |
+ |
|
| 349 |
+ |
buffer = dbuf_alloc(); |
| 350 |
+ |
|
| 351 |
+ |
dbuf_put(buffer, ":%s %03d %s ", ID_or_name(from, to), numeric, dest); |
| 352 |
+ |
|
| 353 |
+ |
va_start(args, numeric); |
| 354 |
+ |
send_format(buffer, numeric_form(numeric), args); |
| 355 |
+ |
va_end(args); |
| 356 |
+ |
|
| 357 |
+ |
send_message(to, buffer); |
| 358 |
|
|
| 359 |
|
dbuf_ref_free(buffer); |
| 360 |
|
} |