53 |
|
#include "listener.h" |
54 |
|
#include "irc_res.h" |
55 |
|
#include "userhost.h" |
56 |
+ |
#include "watch.h" |
57 |
|
|
58 |
|
dlink_list listing_client_list = { NULL, NULL, 0 }; |
59 |
|
/* Pointer to beginning of Client list */ |
766 |
|
add_history(source_p, 0); |
767 |
|
off_history(source_p); |
768 |
|
|
769 |
+ |
watch_check_hash(source_p, RPL_LOGOFF); |
770 |
+ |
|
771 |
|
if (!MyConnect(source_p)) |
772 |
|
{ |
773 |
|
source_p->from->serv->dep_users--; |
969 |
|
if (source_p->localClient->list_task != NULL) |
970 |
|
free_list_task(source_p->localClient->list_task, source_p); |
971 |
|
|
972 |
+ |
watch_del_watch_list(source_p); |
973 |
|
sendto_realops_flags(UMODE_CCONN, L_ALL, "Client exiting: %s (%s@%s) [%s] [%s]", |
974 |
|
source_p->name, source_p->username, source_p->host, comment, |
975 |
|
ConfigFileEntry.hide_spoof_ips && IsIPSpoof(source_p) ? |
1392 |
|
void |
1393 |
|
change_local_nick(struct Client *client_p, struct Client *source_p, const char *nick) |
1394 |
|
{ |
1395 |
+ |
int samenick = 0; |
1396 |
+ |
|
1397 |
|
/* |
1398 |
|
** Client just changing his/her nick. If he/she is |
1399 |
|
** on a channel, send note of change to all clients |
1411 |
|
!ConfigFileEntry.anti_nick_flood || |
1412 |
|
(IsOper(source_p) && ConfigFileEntry.no_oper_flood)) |
1413 |
|
{ |
1414 |
< |
if (irccmp(source_p->name, nick)) |
1414 |
> |
samenick = !irccmp(source_p->name, nick); |
1415 |
> |
|
1416 |
> |
if (!samenick) |
1417 |
|
{ |
1418 |
|
/* |
1419 |
|
* Make sure everyone that has this client on its accept list |
1460 |
|
if (source_p->name[0]) |
1461 |
|
hash_del_client(source_p); |
1462 |
|
|
1463 |
+ |
if (!samenick) |
1464 |
+ |
{ |
1465 |
+ |
clear_ban_cache_client(source_p); |
1466 |
+ |
watch_check_hash(source_p, RPL_LOGOFF); |
1467 |
+ |
} |
1468 |
+ |
|
1469 |
|
strcpy(source_p->name, nick); |
1470 |
|
hash_add_client(source_p); |
1471 |
|
|
1472 |
+ |
if (!samenick) |
1473 |
+ |
watch_check_hash(source_p, RPL_LOGON); |
1474 |
+ |
|
1475 |
|
/* fd_desc is long enough */ |
1476 |
|
fd_note(&client_p->localClient->fd, "Nick: %s", nick); |
1477 |
|
} |