ViewVC Help
View File | Revision Log | Show Annotations | View Changeset | Root Listing
root/svn/ircd-hybrid/branches/8.2.x/src/send.c
(Generate patch)

Comparing ircd-hybrid/trunk/src/send.c (file contents):
Revision 3107 by michael, Thu Mar 6 12:09:42 2014 UTC vs.
Revision 3109 by michael, Thu Mar 6 19:25:12 2014 UTC

# Line 172 | Line 172 | send_message_remote(struct Client *to, s
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;
# Line 327 | Line 326 | sendto_one(struct Client *to, const char
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   }

Diff Legend

Removed lines
+ Added lines
< Changed lines (old)
> Changed lines (new)