42 |
|
#include "listener.h" |
43 |
|
#include "userhost.h" |
44 |
|
#include "s_stats.h" |
45 |
+ |
#include "watch.h" |
46 |
|
|
47 |
|
dlink_list listing_client_list = { NULL, NULL, 0 }; |
48 |
|
/* Pointer to beginning of Client list */ |
774 |
|
if (source_p->name[0]) |
775 |
|
hash_del_client(source_p); |
776 |
|
|
777 |
+ |
hash_check_watch(source_p, RPL_LOGOFF); |
778 |
+ |
|
779 |
|
if (IsUserHostIp(source_p)) |
780 |
|
delete_user_host(source_p->username, source_p->host, !MyConnect(source_p)); |
781 |
|
|
961 |
|
dlinkDelete(&source_p->localClient->lclient_node, &local_client_list); |
962 |
|
if (source_p->localClient->list_task != NULL) |
963 |
|
free_list_task(source_p->localClient->list_task, source_p); |
964 |
< |
|
964 |
> |
hash_del_watch_list(source_p); |
965 |
|
sendto_realops_flags(UMODE_CCONN, L_ALL, "Client exiting: %s (%s@%s) [%s] [%s]", |
966 |
|
source_p->name, source_p->username, source_p->host, comment, |
967 |
|
ConfigFileEntry.hide_spoof_ips && IsIPSpoof(source_p) ? |
1493 |
|
void |
1494 |
|
change_local_nick(struct Client *client_p, struct Client *source_p, const char *nick) |
1495 |
|
{ |
1496 |
+ |
int samenick = 0; |
1497 |
|
/* |
1498 |
|
** Client just changing his/her nick. If he/she is |
1499 |
|
** on a channel, send note of change to all clients |
1511 |
|
!ConfigFileEntry.anti_nick_flood || |
1512 |
|
(IsOper(source_p) && ConfigFileEntry.no_oper_flood)) |
1513 |
|
{ |
1514 |
< |
if (irccmp(source_p->name, nick)) |
1514 |
> |
samenick = !irccmp(source_p->name, nick); |
1515 |
> |
if (!samenick) |
1516 |
|
source_p->tsinfo = CurrentTime; |
1517 |
|
|
1518 |
|
/* XXX - the format of this notice should eventually be changed |
1548 |
|
} |
1549 |
|
|
1550 |
|
/* Finally, add to hash */ |
1551 |
< |
if (source_p->name[0]) |
1547 |
< |
hash_del_client(source_p); |
1551 |
> |
assert(source_p->name[0]); |
1552 |
|
|
1553 |
+ |
hash_del_client(source_p); |
1554 |
+ |
if (!samenick) |
1555 |
+ |
hash_check_watch(source_p, RPL_LOGOFF); |
1556 |
|
strcpy(source_p->name, nick); |
1557 |
|
hash_add_client(source_p); |
1558 |
|
|
1559 |
< |
/* Make sure everyone that has this client on its accept list |
1559 |
> |
if (!samenick) |
1560 |
> |
hash_check_watch(source_p, RPL_LOGON); |
1561 |
> |
/* |
1562 |
> |
* Make sure everyone that has this client on its accept list |
1563 |
|
* loses that reference. |
1564 |
|
*/ |
1565 |
|
del_all_their_accepts(source_p); |