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

Comparing ircd-hybrid/src/client.c (file contents):
Revision 603 by michael, Sun May 14 10:32:26 2006 UTC vs.
Revision 605 by michael, Tue May 16 07:05:34 2006 UTC

# Line 565 | Line 565 | update_client_exit_stats(struct Client *
565   * output       - return client pointer
566   * side effects - find person by (nick)name
567   */
568 /* XXX - ugly wrapper */
568   struct Client *
569 < find_person(const struct Client *client_p, const char *name)
569 > find_person(const struct Client *source_p, const char *name)
570   {
571 <  struct Client *c2ptr;
571 >  struct Client *target_p = NULL;
572  
573 <  if (IsDigit(*name))
574 <  {
576 <    if ((c2ptr = hash_find_id(name)) != NULL)
577 <    {
578 <      /* invisible users shall not be found by UID guessing */
579 <      if (IsInvisible(c2ptr) && !IsServer(client_p))
580 <        c2ptr = NULL;
581 <    }
582 <  }
573 >  if (IsDigit(*name) && IsServer(source_p->from))
574 >    target_p = hash_find_id(name);
575    else
576 <    c2ptr = find_client(name);
576 >    target_p = find_client(name);
577  
578 <  return ((c2ptr != NULL && IsClient(c2ptr)) ? c2ptr : NULL);
578 >  return (target_p && IsClient(target_p)) ? target_p : NULL;
579   }
580  
581   /*
# Line 593 | Line 585 | find_person(const struct Client *client_
585   *      through the history, chasing will be 1 and otherwise 0.
586   */
587   struct Client *
588 < find_chasing(struct Client *client_p, struct Client *source_p, const char *user, int *chasing)
588 > find_chasing(struct Client *source_p, const char *user, int *chasing)
589   {
590 <  struct Client *who = find_person(client_p, user);
590 >  struct Client *who = find_person(source_p, user);
591  
592    if (chasing)
593      *chasing = 0;

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines