static void net_destroy(struct a_network *net) { mowgli_free(net->name); if (net->acct) net_del_from_account(net); if (net->host) mowgli_free(net->host); mowgli_free(net->nick); mowgli_free(net->ident); mowgli_free(net->gecos); mowgli_free(net->nd.nick); mowgli_free(net->nd.ident); mowgli_free(net->nd.host); mowgli_free(net->nd.gecos); irc_isupport_destroy(net->nd.isupport); mowgli_string_destroy(net->nd.motd); if (net->linebuf) mowgli_linebuf_destroy(net->linebuf); mowgli_list_free(net->clients); /* XXX */ mowgli_free(net); }
void sigyn_cleanup(void) { logger(LOG_GENERAL, "Running cleanup."); modules_shutdown(); if (me.uplink.connected) mowgli_linebuf_destroy(me.uplink.line); mowgli_eventloop_destroy(me.ev); logger_deinit(); }
static int net_disconnect(struct a_network *net) { if (net->state == NET_DISCONNECTED) { a_log(LERROR, "Attempt to disconnect disconnected network"); return; } if (net->linebuf) { mowgli_linebuf_destroy(net->linebuf); net->linebuf = NULL; } return 0; }