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