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

Comparing ircd-hybrid-7.2/src/client.c (file contents):
Revision 875 by db, Thu Feb 22 06:01:30 2007 UTC vs.
Revision 876 by michael, Wed Oct 24 21:51:21 2007 UTC

# Line 53 | Line 53
53   #include "listener.h"
54   #include "irc_res.h"
55   #include "userhost.h"
56 + #include "watch.h"
57  
58   dlink_list listing_client_list = { NULL, NULL, 0 };
59   /* Pointer to beginning of Client list */
# Line 765 | Line 766 | exit_one_client(struct Client *source_p,
766      add_history(source_p, 0);
767      off_history(source_p);
768  
769 +    watch_check_hash(source_p, RPL_LOGOFF);
770 +
771      if (!MyConnect(source_p))
772      {
773        source_p->from->serv->dep_users--;
# Line 966 | Line 969 | exit_client(struct Client *source_p, str
969        if (source_p->localClient->list_task != NULL)
970          free_list_task(source_p->localClient->list_task, source_p);
971  
972 +      watch_del_watch_list(source_p);
973        sendto_realops_flags(UMODE_CCONN, L_ALL, "Client exiting: %s (%s@%s) [%s] [%s]",
974                             source_p->name, source_p->username, source_p->host, comment,
975                             ConfigFileEntry.hide_spoof_ips && IsIPSpoof(source_p) ?
# Line 1388 | Line 1392 | set_initial_nick(struct Client *client_p
1392   void
1393   change_local_nick(struct Client *client_p, struct Client *source_p, const char *nick)
1394   {
1395 +  int samenick = 0;
1396 +
1397    /*
1398    ** Client just changing his/her nick. If he/she is
1399    ** on a channel, send note of change to all clients
# Line 1405 | Line 1411 | change_local_nick(struct Client *client_
1411       !ConfigFileEntry.anti_nick_flood ||
1412       (IsOper(source_p) && ConfigFileEntry.no_oper_flood))
1413    {
1414 <    if (irccmp(source_p->name, nick))
1414 >    samenick = !irccmp(source_p->name, nick);
1415 >
1416 >    if (!samenick)
1417      {
1418        /*
1419         * Make sure everyone that has this client on its accept list
# Line 1452 | Line 1460 | change_local_nick(struct Client *client_
1460    if (source_p->name[0])
1461      hash_del_client(source_p);
1462  
1463 +  if (!samenick)
1464 +  {
1465 +    clear_ban_cache_client(source_p);
1466 +    watch_check_hash(source_p, RPL_LOGOFF);
1467 +  }
1468 +
1469    strcpy(source_p->name, nick);
1470    hash_add_client(source_p);
1471  
1472 +  if (!samenick)
1473 +    watch_check_hash(source_p, RPL_LOGON);
1474 +
1475    /* fd_desc is long enough */
1476    fd_note(&client_p->localClient->fd, "Nick: %s", nick);
1477   }

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines