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! */ |
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 |
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; |
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); |
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 |
|
} |
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)) |
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 |
|
/* |
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 |
|
{ |
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 |
|
|
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 |