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 220 by michael, Wed Oct 26 12:07:33 2005 UTC vs.
Revision 221 by michael, Thu Nov 3 15:36:27 2005 UTC

# Line 42 | Line 42
42   #include "listener.h"
43   #include "userhost.h"
44   #include "s_stats.h"
45 + #include "watch.h"
46  
47   dlink_list listing_client_list = { NULL, NULL, 0 };
48   /* Pointer to beginning of Client list */
# Line 773 | Line 774 | exit_one_client(struct Client *source_p,
774    if (source_p->name[0])
775      hash_del_client(source_p);
776  
777 +  hash_check_watch(source_p, RPL_LOGOFF);
778 +
779    if (IsUserHostIp(source_p))
780      delete_user_host(source_p->username, source_p->host, !MyConnect(source_p));
781  
# Line 958 | Line 961 | exit_client(struct Client *source_p, str
961        dlinkDelete(&source_p->localClient->lclient_node, &local_client_list);
962        if (source_p->localClient->list_task != NULL)
963          free_list_task(source_p->localClient->list_task, source_p);
964 <
964 >      hash_del_watch_list(source_p);
965        sendto_realops_flags(UMODE_CCONN, L_ALL, "Client exiting: %s (%s@%s) [%s] [%s]",
966                             source_p->name, source_p->username, source_p->host, comment,
967                             ConfigFileEntry.hide_spoof_ips && IsIPSpoof(source_p) ?
# Line 1490 | Line 1493 | set_initial_nick(struct Client *client_p
1493   void
1494   change_local_nick(struct Client *client_p, struct Client *source_p, const char *nick)
1495   {
1496 +  int samenick = 0;
1497    /*
1498    ** Client just changing his/her nick. If he/she is
1499    ** on a channel, send note of change to all clients
# Line 1507 | Line 1511 | change_local_nick(struct Client *client_
1511       !ConfigFileEntry.anti_nick_flood ||
1512       (IsOper(source_p) && ConfigFileEntry.no_oper_flood))
1513    {
1514 <    if (irccmp(source_p->name, nick))
1514 >    samenick = !irccmp(source_p->name, nick);
1515 >    if (!samenick)
1516        source_p->tsinfo = CurrentTime;
1517  
1518      /* XXX - the format of this notice should eventually be changed
# Line 1543 | Line 1548 | change_local_nick(struct Client *client_
1548    }
1549  
1550    /* Finally, add to hash */
1551 <  if (source_p->name[0])
1547 <    hash_del_client(source_p);
1551 >  assert(source_p->name[0]);
1552  
1553 +  hash_del_client(source_p);
1554 +  if (!samenick)
1555 +    hash_check_watch(source_p, RPL_LOGOFF);
1556    strcpy(source_p->name, nick);
1557    hash_add_client(source_p);
1558  
1559 <  /* Make sure everyone that has this client on its accept list
1559 >  if (!samenick)
1560 >    hash_check_watch(source_p, RPL_LOGON);
1561 >  /*
1562 >   * Make sure everyone that has this client on its accept list
1563     * loses that reference.
1564     */
1565    del_all_their_accepts(source_p);

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines