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 1124 by michael, Mon Feb 7 11:45:27 2011 UTC vs.
ircd-hybrid-8/src/client.c (file contents), Revision 1176 by michael, Sun Aug 14 11:24:24 2011 UTC

# Line 123 | Line 123 | make_client(struct Client *from)
123      client_p->localClient = BlockHeapAlloc(lclient_heap);
124      client_p->localClient->registration = REG_INIT;
125      /* as good a place as any... */
126 <    dlinkAdd(client_p, make_dlink_node(), &unknown_list);
126 >    dlinkAdd(client_p, &client_p->localClient->lclient_node, &unknown_list);
127    }
128    else
129      client_p->from = from; /* 'from' of local client is self! */
# Line 252 | Line 252 | check_pings_list(dlink_list *list)
252        continue;
253      }
254  
255    if (GlobalSetOptions.idletime && IsClient(client_p))
256    {
257      if (!IsExemptKline(client_p) && !IsOper(client_p) &&
258          !IsIdlelined(client_p) &&
259          ((CurrentTime - client_p->localClient->last) > GlobalSetOptions.idletime))
260      {
261        struct ConfItem *conf;
262        struct AccessItem *aconf;
263
264        conf = make_conf_item(KLINE_TYPE);
265        aconf = map_to_conf(conf);
266
267        DupString(aconf->host, client_p->host);
268        DupString(aconf->reason, "idle exceeder");
269        DupString(aconf->user, client_p->username);
270        aconf->hold = CurrentTime + 60;
271        add_temp_line(conf);
272
273        sendto_realops_flags(UMODE_ALL, L_ALL,
274                             "Idle time limit exceeded for %s - temp k-lining",
275                             get_client_name(client_p, HIDE_IP));
276        exit_client(client_p, &me, aconf->reason);
277        continue;
278      }
279    }
280
255      if (!IsRegistered(client_p))
256        ping = CONNECTTIMEOUT, pingwarn = 0;
257      else
# Line 553 | Line 527 | ban_them(struct Client *client_p, struct
527   static void
528   update_client_exit_stats(struct Client *client_p)
529   {
530 <  if (IsServer(client_p))
557 <  {
558 <    sendto_realops_flags(UMODE_EXTERNAL, L_ALL, "Server %s split from %s",
559 <                         client_p->name, client_p->servptr->name);
560 <  }
561 <  else if (IsClient(client_p))
530 >  if (IsClient(client_p))
531    {
532      assert(Count.total > 0);
533      --Count.total;
# Line 567 | Line 536 | update_client_exit_stats(struct Client *
536      if (IsInvisible(client_p))
537        --Count.invisi;
538    }
539 +  else if (IsServer(client_p))
540 +    sendto_realops_flags(UMODE_EXTERNAL, L_ALL, "Server %s split from %s",
541 +                         client_p->name, client_p->servptr->name);
542  
543    if (splitchecking && !splitmode)
544      check_splitmode(NULL);
# Line 594 | Line 566 | find_person(const struct Client *client_
566      }
567    }
568    else
569 <    c2ptr = find_client(name);
569 >    c2ptr = hash_find_client(name);
570  
571    return ((c2ptr != NULL && IsClient(c2ptr)) ? c2ptr : NULL);
572   }
# Line 614 | Line 586 | find_chasing(struct Client *client_p, st
586      *chasing = 0;
587  
588    if (who)
589 <    return(who);
589 >    return who;
590  
591    if (IsDigit(*user))
592 <    return(NULL);
592 >    return NULL;
593  
594    if ((who = get_history(user,
595                          (time_t)ConfigFileEntry.kill_chase_time_limit))
# Line 625 | Line 597 | find_chasing(struct Client *client_p, st
597    {
598      sendto_one(source_p, form_str(ERR_NOSUCHNICK),
599                 me.name, source_p->name, user);
600 <    return(NULL);
600 >    return NULL;
601    }
602  
603    if (chasing)
604      *chasing = 1;
605  
606 <  return(who);
606 >  return who;
607   }
608  
609   /*
# Line 920 | Line 892 | exit_client(struct Client *source_p, str
892       */
893      if (!IsRegistered(source_p))
894      {
895 <      if ((m = dlinkFindDelete(&unknown_list, source_p)) != NULL)
896 <        free_dlink_node(m);
895 >      assert(dlinkFind(&unknown_list, source_p));
896 >
897 >      dlinkDelete(&source_p->localClient->lclient_node, &unknown_list);
898      }
899      else if (IsClient(source_p))
900      {
# Line 934 | Line 907 | exit_client(struct Client *source_p, str
907            free_dlink_node(m);
908        }
909  
910 +      assert(dlinkFind(&local_client_list, source_p));
911        dlinkDelete(&source_p->localClient->lclient_node, &local_client_list);
912 +
913        if (source_p->localClient->list_task != NULL)
914          free_list_task(source_p->localClient->list_task, source_p);
915  
# Line 1291 | Line 1266 | change_local_nick(struct Client *client_
1266        source_p->tsinfo = CurrentTime;
1267        clear_ban_cache_client(source_p);
1268        watch_check_hash(source_p, RPL_LOGOFF);
1269 +
1270 +      if (HasUMode(source_p, UMODE_REGISTERED))
1271 +      {
1272 +        unsigned int oldmodes = source_p->umodes;
1273 +        char modebuf[IRCD_BUFSIZE] = { '\0' };
1274 +
1275 +        DelUMode(source_p, UMODE_REGISTERED);
1276 +        send_umode(source_p, source_p, oldmodes, 0xffffffff, modebuf);
1277 +      }
1278      }
1279  
1280      /* XXX - the format of this notice should eventually be changed

Diff Legend

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