148 |
|
assert(client_p != NULL); |
149 |
|
assert(client_p != &me); |
150 |
|
assert(client_p->hnext == client_p); |
151 |
– |
assert(client_p->invited.head == NULL); |
151 |
|
assert(client_p->channel.head == NULL); |
153 |
– |
assert(dlink_list_length(&client_p->invited) == 0); |
152 |
|
assert(dlink_list_length(&client_p->channel) == 0); |
153 |
|
|
154 |
|
MyFree(client_p->away); |
156 |
|
|
157 |
|
if (MyConnect(client_p)) |
158 |
|
{ |
159 |
+ |
assert(client_p->localClient->invited.head == NULL); |
160 |
+ |
assert(dlink_list_length(&client_p->localClient->invited) == 0); |
161 |
|
assert(IsClosing(client_p) && IsDead(client_p)); |
162 |
|
|
163 |
|
MyFree(client_p->localClient->response); |
758 |
|
DLINK_FOREACH_SAFE(lp, next_lp, source_p->channel.head) |
759 |
|
remove_user_from_channel(lp->data); |
760 |
|
|
761 |
– |
/* Clean up invitefield */ |
762 |
– |
DLINK_FOREACH_SAFE(lp, next_lp, source_p->invited.head) |
763 |
– |
del_invite(lp->data, source_p); |
764 |
– |
|
761 |
|
/* Clean up allow lists */ |
762 |
|
del_all_accepts(source_p); |
763 |
|
add_history(source_p, 0); |
768 |
|
source_p->from->serv->dep_users--; |
769 |
|
assert(source_p->from->serv->dep_users >= 0); |
770 |
|
} |
771 |
+ |
else |
772 |
+ |
{ |
773 |
+ |
/* Clean up invitefield */ |
774 |
+ |
DLINK_FOREACH_SAFE(lp, next_lp, source_p->localClient->invited.head) |
775 |
+ |
del_invite(lp->data, source_p); |
776 |
+ |
} |
777 |
|
} |
778 |
|
|
779 |
|
/* Remove source_p from the client lists */ |
1055 |
|
} |
1056 |
|
else if (IsClient(source_p) && !IsKilled(source_p)) |
1057 |
|
{ |
1058 |
< |
sendto_server(NULL, source_p, NULL, CAP_TS6, NOCAPS, NOFLAGS, |
1058 |
> |
sendto_server(from->from, source_p, NULL, CAP_TS6, NOCAPS, NOFLAGS, |
1059 |
|
":%s QUIT :%s", ID(source_p), comment); |
1060 |
< |
sendto_server(NULL, source_p, NULL, NOCAPS, CAP_TS6, NOFLAGS, |
1060 |
> |
sendto_server(from->from, source_p, NULL, NOCAPS, CAP_TS6, NOFLAGS, |
1061 |
|
":%s QUIT :%s", source_p->name, comment); |
1062 |
|
} |
1063 |
|
|
1233 |
|
if (IsSoftCallerId(target)) |
1234 |
|
{ |
1235 |
|
DLINK_FOREACH(ptr, target->channel.head) |
1236 |
< |
if (IsMember(source, ptr->data)) |
1236 |
> |
if (IsMember(source, ((struct Membership *)ptr->data)->chptr)) |
1237 |
|
return (1); |
1238 |
|
} |
1239 |
|
|