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

Comparing ircd-hybrid-7.3/src/client.c (file contents):
Revision 1029 by michael, Sun Nov 8 13:10:50 2009 UTC vs.
Revision 1118 by michael, Thu Jan 6 13:39:10 2011 UTC

# Line 719 | Line 719 | exit_one_client(struct Client *source_p,
719  
720    assert(!IsMe(source_p));
721  
722 <  if (IsServer(source_p))
723 <  {
724 <    dlinkDelete(&source_p->lnode, &source_p->servptr->serv->server_list);
725 <
726 <    if ((lp = dlinkFindDelete(&global_serv_list, source_p)) != NULL)
727 <      free_dlink_node(lp);
728 <  }
729 <  else if (IsClient(source_p))
722 >  if (IsClient(source_p))
723    {
724      if (source_p->servptr->serv != NULL)
725        dlinkDelete(&source_p->lnode, &source_p->servptr->serv->client_list);
726  
727 <    /* If a person is on a channel, send a QUIT notice
728 <    ** to every client (person) on the same channel (so
729 <    ** that the client can show the "**signoff" message).
730 <    ** (Note: The notice is to the local clients *only*)
731 <    */
727 >    /*
728 >     * If a person is on a channel, send a QUIT notice
729 >     * to every client (person) on the same channel (so
730 >     * that the client can show the "**signoff" message).
731 >     * (Note: The notice is to the local clients *only*)
732 >     */
733      sendto_common_channels_local(source_p, 0, ":%s!%s@%s QUIT :%s",
734                                   source_p->name, source_p->username,
735                                   source_p->host, quitmsg);
# Line 756 | Line 750 | exit_one_client(struct Client *source_p,
750        del_all_accepts(source_p);
751      }
752    }
753 +  else if (IsServer(source_p))
754 +  {
755 +    dlinkDelete(&source_p->lnode, &source_p->servptr->serv->server_list);
756 +
757 +    if ((lp = dlinkFindDelete(&global_serv_list, source_p)) != NULL)
758 +      free_dlink_node(lp);
759 +  }
760  
761    /* Remove source_p from the client lists */
762    if (HasID(source_p))
# Line 795 | Line 796 | exit_one_client(struct Client *source_p,
796   static void
797   recurse_send_quits(struct Client *original_source_p, struct Client *source_p,
798                     struct Client *from, struct Client *to, const char *comment,
799 <                   const char *splitstr, const char *myname)
799 >                   const char *splitstr)
800   {
801    dlink_node *ptr, *next;
802    struct Client *target_p;
803 <  int hidden = match(myname, source_p->name);
803 >  int hidden = match(me.name, source_p->name); /* XXX */
804  
805    assert(to != source_p);  /* should be already removed from serv_list */
806  
# Line 818 | Line 819 | recurse_send_quits(struct Client *origin
819  
820    DLINK_FOREACH_SAFE(ptr, next, source_p->serv->server_list.head)
821      recurse_send_quits(original_source_p, ptr->data, from, to,
822 <                       comment, splitstr, myname);
822 >                       comment, splitstr);
823  
824    if (!hidden && ((source_p == original_source_p && to != from) ||
825                    !IsCapable(to, CAP_QS)))
# Line 859 | Line 860 | static void
860   remove_dependents(struct Client *source_p, struct Client *from,
861                    const char *comment, const char *splitstr)
862   {
863 <  struct Client *to;
863 <  struct ConfItem *conf;
864 <  static char myname[HOSTLEN+1];
865 <  dlink_node *ptr;
863 >  dlink_node *ptr = NULL;
864  
865    DLINK_FOREACH(ptr, serv_list.head)
866 <  {
867 <    to = ptr->data;
870 <
871 <    if ((conf = to->serv->sconf) != NULL)
872 <      strlcpy(myname, my_name_for_link(conf), sizeof(myname));
873 <    else
874 <      strlcpy(myname, me.name, sizeof(myname));
875 <    recurse_send_quits(source_p, source_p, from, to,
876 <                       comment, splitstr, myname);
877 <  }
866 >    recurse_send_quits(source_p, source_p, from, ptr->data,
867 >                       comment, splitstr);
868  
869    recurse_remove_clients(source_p, splitstr);
870   }
# Line 900 | Line 890 | remove_dependents(struct Client *source_
890   void
891   exit_client(struct Client *source_p, struct Client *from, const char *comment)
892   {
893 <  dlink_node *m;
893 >  dlink_node *m = NULL;
894  
895    if (MyConnect(source_p))
896    {

Diff Legend

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