331 |
assert(!EmptyString(name)); |
assert(!EmptyString(name)); |
332 |
|
|
333 |
struct Channel *chptr = xcalloc(sizeof(*chptr)); |
struct Channel *chptr = xcalloc(sizeof(*chptr)); |
334 |
|
chptr->hnextch = chptr; |
335 |
/* Doesn't hurt to set it here */ |
/* Doesn't hurt to set it here */ |
336 |
chptr->creationtime = CurrentTime; |
chptr->creationtime = CurrentTime; |
337 |
chptr->last_join_time = CurrentTime; |
chptr->last_join_time = CurrentTime; |
363 |
dlinkDelete(&chptr->node, &channel_list); |
dlinkDelete(&chptr->node, &channel_list); |
364 |
hash_del_channel(chptr); |
hash_del_channel(chptr); |
365 |
|
|
366 |
|
assert(chptr->hnextch == chptr); |
367 |
|
|
368 |
|
assert(chptr->node.prev == NULL); |
369 |
|
assert(chptr->node.next == NULL); |
370 |
|
|
371 |
|
assert(dlink_list_length(&chptr->locmembers) == 0); |
372 |
|
assert(chptr->locmembers.head == NULL); |
373 |
|
assert(chptr->locmembers.tail == NULL); |
374 |
|
|
375 |
|
assert(dlink_list_length(&chptr->members) == 0); |
376 |
|
assert(chptr->members.head == NULL); |
377 |
|
assert(chptr->members.tail == NULL); |
378 |
|
|
379 |
|
assert(dlink_list_length(&chptr->invites) == 0); |
380 |
|
assert(chptr->invites.head == NULL); |
381 |
|
assert(chptr->invites.tail == NULL); |
382 |
|
|
383 |
|
assert(dlink_list_length(&chptr->banlist) == 0); |
384 |
|
assert(chptr->banlist.head == NULL); |
385 |
|
assert(chptr->banlist.tail == NULL); |
386 |
|
|
387 |
|
assert(dlink_list_length(&chptr->exceptlist) == 0); |
388 |
|
assert(chptr->exceptlist.head == NULL); |
389 |
|
assert(chptr->exceptlist.tail == NULL); |
390 |
|
|
391 |
|
assert(dlink_list_length(&chptr->invexlist) == 0); |
392 |
|
assert(chptr->invexlist.head == NULL); |
393 |
|
assert(chptr->invexlist.tail == NULL); |
394 |
|
|
395 |
xfree(chptr); |
xfree(chptr); |
396 |
} |
} |
397 |
|
|