void rmchan(CHANNEL *chan, acetables *g_ape) { if (chan->head != NULL) { struct userslist *head = chan->head; chan->flags |= CHANNEL_NONINTERACTIVE; /* Force to be non interactive (don't send LEFT raw) */ chan->flags &= ~CHANNEL_AUTODESTROY; /* Don't destroy it */ while(head != NULL) { struct userslist *thead = head->next; left(head->userinfo, chan, g_ape); head = thead; } } FIRE_EVENT_NULL(rmchan, chan, g_ape); rmallban(chan); hashtbl_erase(g_ape->hLusers, chan->name); clear_properties(&chan->properties); destroy_pipe(chan->pipe, g_ape); free(chan); chan = NULL; }
void rmchan(CHANNEL *chan, acetables *g_ape) { if (chan->head != NULL) { return; } rmallban(chan); hashtbl_erase(g_ape->hLusers, chan->name); clear_properties(&chan->properties); destroy_pipe(chan->pipe, g_ape); free(chan); chan = NULL; }