/[svn]/ircd-hybrid/branches/8.2.x/src/client.c
ViewVC logotype

Diff of /ircd-hybrid/branches/8.2.x/src/client.c

Parent Directory Parent Directory | Revision Log Revision Log | View Patch Patch

revision 4882 by michael, Sun Nov 2 11:45:16 2014 UTC revision 4883 by michael, Tue Nov 18 16:22:18 2014 UTC
# Line 144  free_client(struct Client *client_p) Line 144  free_client(struct Client *client_p)
144      client_p->connection->challenge_operator = NULL;      client_p->connection->challenge_operator = NULL;
145    
146      /*      /*
147       * clean up extra sockets from P-lines which have been discarded.       * Clean up extra sockets from listen{} blocks which have been discarded.
148       */       */
149      if (client_p->connection->listener)      if (client_p->connection->listener)
150      {      {
# Line 482  find_person(const struct Client *const s Line 482  find_person(const struct Client *const s
482  struct Client *  struct Client *
483  find_chasing(struct Client *source_p, const char *name)  find_chasing(struct Client *source_p, const char *name)
484  {  {
485    struct Client *who = find_person(source_p, name);    struct Client *target_p = find_person(source_p, name);
486    
487    if (who)    if (target_p)
488      return who;      return target_p;
489    
490    if (IsDigit(*name))    if (IsDigit(*name))
491      return NULL;      return NULL;
492    
493    if ((who = whowas_get_history(name,    target_p = whowas_get_history(name, (time_t)ConfigGeneral.kill_chase_time_limit);
494                           (time_t)ConfigGeneral.kill_chase_time_limit))  
495                           == NULL)    if (!target_p)
496    {    {
497      sendto_one_numeric(source_p, &me, ERR_NOSUCHNICK, name);      sendto_one_numeric(source_p, &me, ERR_NOSUCHNICK, name);
498      return NULL;      return NULL;
499    }    }
500    
501    return who;    return target_p;
502  }  }
503    
504  /*  /*
# Line 607  exit_one_client(struct Client *source_p, Line 607  exit_one_client(struct Client *source_p,
607      sendto_common_channels_local(source_p, 0, 0, ":%s!%s@%s QUIT :%s",      sendto_common_channels_local(source_p, 0, 0, ":%s!%s@%s QUIT :%s",
608                                   source_p->name, source_p->username,                                   source_p->name, source_p->username,
609                                   source_p->host, comment);                                   source_p->host, comment);
610    
611      DLINK_FOREACH_SAFE(node, node_next, source_p->channel.head)      DLINK_FOREACH_SAFE(node, node_next, source_p->channel.head)
612        remove_user_from_channel(node->data);        remove_user_from_channel(node->data);
613    
# Line 636  exit_one_client(struct Client *source_p, Line 637  exit_one_client(struct Client *source_p,
637    /* Remove source_p from the client lists */    /* Remove source_p from the client lists */
638    if (source_p->id[0])    if (source_p->id[0])
639      hash_del_id(source_p);      hash_del_id(source_p);
640    
641    if (source_p->name[0])    if (source_p->name[0])
642      hash_del_client(source_p);      hash_del_client(source_p);
643    
# Line 732  exit_client(struct Client *source_p, con Line 734  exit_client(struct Client *source_p, con
734      else if (IsClient(source_p))      else if (IsClient(source_p))
735      {      {
736        time_t on_for = CurrentTime - source_p->connection->firsttime;        time_t on_for = CurrentTime - source_p->connection->firsttime;
737    
738        assert(Count.local > 0);        assert(Count.local > 0);
739        Count.local--;        --Count.local;
740    
741        if (HasUMode(source_p, UMODE_OPER))        if (HasUMode(source_p, UMODE_OPER))
742          if ((node = dlinkFindDelete(&oper_list, source_p)))          if ((node = dlinkFindDelete(&oper_list, source_p)))
# Line 751  exit_client(struct Client *source_p, con Line 754  exit_client(struct Client *source_p, con
754                             source_p->name, source_p->username, source_p->host, comment,                             source_p->name, source_p->username, source_p->host, comment,
755                             ConfigGeneral.hide_spoof_ips && IsIPSpoof(source_p) ?                             ConfigGeneral.hide_spoof_ips && IsIPSpoof(source_p) ?
756                             "255.255.255.255" : source_p->sockhost);                             "255.255.255.255" : source_p->sockhost);
757    
758        ilog(LOG_TYPE_USER, "%s (%3u:%02u:%02u): %s!%s@%s %llu/%llu",        ilog(LOG_TYPE_USER, "%s (%3u:%02u:%02u): %s!%s@%s %llu/%llu",
759             myctime(source_p->connection->firsttime), (unsigned int)(on_for / 3600),             myctime(source_p->connection->firsttime), (unsigned int)(on_for / 3600),
760             (unsigned int)((on_for % 3600)/60), (unsigned int)(on_for % 60),             (unsigned int)((on_for % 3600)/60), (unsigned int)(on_for % 60),
# Line 1057  idle_time_get(const struct Client *sourc Line 1061  idle_time_get(const struct Client *sourc
1061    
1062    if (!(class->flags & CLASS_FLAGS_FAKE_IDLE) || target_p == source_p)    if (!(class->flags & CLASS_FLAGS_FAKE_IDLE) || target_p == source_p)
1063      return CurrentTime - target_p->connection->last_privmsg;      return CurrentTime - target_p->connection->last_privmsg;
1064    
1065    if (HasUMode(source_p, UMODE_OPER) &&    if (HasUMode(source_p, UMODE_OPER) &&
1066        !(class->flags & CLASS_FLAGS_HIDE_IDLE_FROM_OPERS))        !(class->flags & CLASS_FLAGS_HIDE_IDLE_FROM_OPERS))
1067      return CurrentTime - target_p->connection->last_privmsg;      return CurrentTime - target_p->connection->last_privmsg;

Legend:
Removed from v.4882  
changed lines
  Added in v.4883

svnadmin@ircd-hybrid.org
ViewVC Help
Powered by ViewVC 1.1.28