| 122 |
|
client_p->since = client_p->lasttime = client_p->firsttime = CurrentTime; |
| 123 |
|
|
| 124 |
|
client_p->localClient = BlockHeapAlloc(lclient_heap); |
| 125 |
+ |
client_p->localClient->registration = REG_INIT; |
| 126 |
|
/* as good a place as any... */ |
| 127 |
|
dlinkAdd(client_p, make_dlink_node(), &unknown_list); |
| 128 |
|
} |
| 149 |
|
assert(client_p != NULL); |
| 150 |
|
assert(client_p != &me); |
| 151 |
|
assert(client_p->hnext == client_p); |
| 151 |
– |
assert(client_p->invited.head == NULL); |
| 152 |
|
assert(client_p->channel.head == NULL); |
| 153 |
– |
assert(dlink_list_length(&client_p->invited) == 0); |
| 153 |
|
assert(dlink_list_length(&client_p->channel) == 0); |
| 154 |
|
|
| 155 |
|
MyFree(client_p->away); |
| 157 |
|
|
| 158 |
|
if (MyConnect(client_p)) |
| 159 |
|
{ |
| 160 |
+ |
assert(client_p->localClient->invited.head == NULL); |
| 161 |
+ |
assert(dlink_list_length(&client_p->localClient->invited) == 0); |
| 162 |
|
assert(IsClosing(client_p) && IsDead(client_p)); |
| 163 |
|
|
| 164 |
|
MyFree(client_p->localClient->response); |
| 759 |
|
DLINK_FOREACH_SAFE(lp, next_lp, source_p->channel.head) |
| 760 |
|
remove_user_from_channel(lp->data); |
| 761 |
|
|
| 761 |
– |
/* Clean up invitefield */ |
| 762 |
– |
DLINK_FOREACH_SAFE(lp, next_lp, source_p->invited.head) |
| 763 |
– |
del_invite(lp->data, source_p); |
| 764 |
– |
|
| 762 |
|
/* Clean up allow lists */ |
| 763 |
|
del_all_accepts(source_p); |
| 764 |
|
add_history(source_p, 0); |
| 769 |
|
source_p->from->serv->dep_users--; |
| 770 |
|
assert(source_p->from->serv->dep_users >= 0); |
| 771 |
|
} |
| 772 |
+ |
else |
| 773 |
+ |
{ |
| 774 |
+ |
/* Clean up invitefield */ |
| 775 |
+ |
DLINK_FOREACH_SAFE(lp, next_lp, source_p->localClient->invited.head) |
| 776 |
+ |
del_invite(lp->data, source_p); |
| 777 |
+ |
} |
| 778 |
|
} |
| 779 |
|
|
| 780 |
|
/* Remove source_p from the client lists */ |
| 1056 |
|
} |
| 1057 |
|
else if (IsClient(source_p) && !IsKilled(source_p)) |
| 1058 |
|
{ |
| 1059 |
< |
sendto_server(NULL, source_p, NULL, CAP_TS6, NOCAPS, NOFLAGS, |
| 1059 |
> |
sendto_server(from->from, source_p, NULL, CAP_TS6, NOCAPS, NOFLAGS, |
| 1060 |
|
":%s QUIT :%s", ID(source_p), comment); |
| 1061 |
< |
sendto_server(NULL, source_p, NULL, NOCAPS, CAP_TS6, NOFLAGS, |
| 1061 |
> |
sendto_server(from->from, source_p, NULL, NOCAPS, CAP_TS6, NOFLAGS, |
| 1062 |
|
":%s QUIT :%s", source_p->name, comment); |
| 1063 |
|
} |
| 1064 |
|
|
| 1136 |
|
} |
| 1137 |
|
else |
| 1138 |
|
{ |
| 1139 |
< |
report_error(L_ADMIN, "Lost connection to %s: %d", |
| 1139 |
> |
report_error(L_ADMIN, "Lost connection to %s: %s", |
| 1140 |
|
get_client_name(client_p, SHOW_IP), current_error); |
| 1141 |
< |
report_error(L_OPER, "Lost connection to %s: %d", |
| 1141 |
> |
report_error(L_OPER, "Lost connection to %s: %s", |
| 1142 |
|
get_client_name(client_p, MASK_IP), current_error); |
| 1143 |
|
} |
| 1144 |
|
|
| 1234 |
|
if (IsSoftCallerId(target)) |
| 1235 |
|
{ |
| 1236 |
|
DLINK_FOREACH(ptr, target->channel.head) |
| 1237 |
< |
if (IsMember(source, ptr->data)) |
| 1237 |
> |
if (IsMember(source, ((struct Membership *)ptr->data)->chptr)) |
| 1238 |
|
return (1); |
| 1239 |
|
} |
| 1240 |
|
|
| 1338 |
|
|
| 1339 |
|
/* This had to be copied here to avoid problems.. */ |
| 1340 |
|
source_p->tsinfo = CurrentTime; |
| 1341 |
+ |
source_p->localClient->registration &= ~REG_NEED_NICK; |
| 1342 |
|
|
| 1343 |
|
if (source_p->name[0]) |
| 1344 |
|
hash_del_client(source_p); |
| 1352 |
|
/* They have the nick they want now.. */ |
| 1353 |
|
client_p->llname[0] = '\0'; |
| 1354 |
|
|
| 1355 |
< |
if (source_p->flags & FLAGS_GOTUSER) |
| 1355 |
> |
if (!source_p->localClient->registration) |
| 1356 |
|
{ |
| 1357 |
|
strlcpy(buf, source_p->username, sizeof(buf)); |
| 1358 |
|
|