static char *channels_close() { write_channels(); free_udef(udef); if (lastdeletedmask) nfree(lastdeletedmask); rem_builtins(H_chon, my_chon); rem_builtins(H_dcc, C_dcc_irc); rem_tcl_commands(channels_cmds); rem_tcl_strings(my_tcl_strings); rem_tcl_ints(my_tcl_ints); rem_tcl_coups(mychan_tcl_coups); del_hook(HOOK_USERFILE, (Function) channels_writeuserfile); del_hook(HOOK_BACKUP, (Function) backup_chanfile); del_hook(HOOK_REHASH, (Function) channels_rehash); del_hook(HOOK_PRE_REHASH, (Function) channels_prerehash); del_hook(HOOK_MINUTELY, (Function) check_expired_bans); del_hook(HOOK_MINUTELY, (Function) check_expired_exempts); del_hook(HOOK_MINUTELY, (Function) check_expired_invites); Tcl_UntraceVar(interp, "global-chanset", TCL_TRACE_READS | TCL_TRACE_WRITES | TCL_TRACE_UNSETS, traced_globchanset, NULL); rem_help_reference("channels.help"); rem_help_reference("chaninfo.help"); module_undepend(MODULE_NAME); return NULL; }
static char *filesys_close() { int i; p_tcl_bind_list H_ctcp; Context; putlog(LOG_MISC, "*", "Unloading filesystem, killing all filesystem connections.."); for (i = 0; i < dcc_total; i++) if (dcc[i].type == &DCC_FILES) { dprintf(i, DCC_BOOTED1); dprintf(i, "You have been booted from the filesystem, module unloaded.\n"); killsock(dcc[i].sock); lostdcc(i); } else if (dcc[i].type == &DCC_FILES_PASS) { killsock(dcc[i].sock); lostdcc(i); } rem_tcl_commands(mytcls); rem_tcl_strings(mystrings); rem_tcl_ints(myints); rem_builtins(H_dcc, mydcc); rem_builtins(H_load, myload); rem_builtins(H_fil, myfiles); rem_help_reference("filesys.help"); if ((H_ctcp = find_bind_table("ctcp"))) rem_builtins(H_ctcp, myctcp); del_bind_table(H_fil); del_entry_type(&USERENTRY_DCCDIR); del_lang_section("filesys"); module_undepend(MODULE_NAME); return NULL; }
static char *ctcp_close() { rem_tcl_strings(mystrings); rem_tcl_ints(myints); rem_builtins(H_ctcp, myctcp); rem_help_reference("ctcp.help"); module_undepend(MODULE_NAME); return NULL; }
static char *irc_close() { struct chanset_t *chan; /* Force bot to part all channels */ dprintf(DP_MODE, "JOIN 0\n"); for (chan = chanset; chan; chan = chan->next) clear_channel(chan, 1); del_bind_table(H_topc); del_bind_table(H_splt); del_bind_table(H_sign); del_bind_table(H_rejn); del_bind_table(H_part); del_bind_table(H_nick); del_bind_table(H_mode); del_bind_table(H_kick); del_bind_table(H_join); del_bind_table(H_pubm); del_bind_table(H_pub); del_bind_table(H_need); rem_tcl_strings(mystrings); rem_tcl_ints(myints); rem_builtins(H_dcc, irc_dcc); rem_builtins(H_msg, C_msg); rem_builtins(H_raw, irc_raw); rem_tcl_commands(tclchan_cmds); rem_help_reference("irc.help"); del_hook(HOOK_MINUTELY, (Function) check_expired_chanstuff); del_hook(HOOK_5MINUTELY, (Function) status_log); del_hook(HOOK_ADD_MODE, (Function) real_add_mode); del_hook(HOOK_IDLE, (Function) flush_modes); Tcl_UntraceVar(interp, "rfc-compliant", TCL_TRACE_READS | TCL_TRACE_WRITES | TCL_TRACE_UNSETS, traced_rfccompliant, NULL); Tcl_UntraceVar(interp, "net-type", TCL_TRACE_READS | TCL_TRACE_WRITES | TCL_TRACE_UNSETS, traced_nettype, NULL); module_undepend(MODULE_NAME); return NULL; }
static char *notes_close() { p_tcl_bind_list H_temp; rem_tcl_ints(notes_ints); rem_tcl_strings(notes_strings); rem_tcl_commands(notes_tcls); if ((H_temp = find_bind_table("msg"))) rem_builtins(H_temp, notes_msgs); if ((H_temp = find_bind_table("join"))) rem_builtins(H_temp, notes_join); rem_builtins(H_dcc, notes_cmds); rem_builtins(H_chon, notes_chon); rem_builtins(H_away, notes_away); rem_builtins(H_nkch, notes_nkch); rem_builtins(H_load, notes_load); rem_help_reference("notes.help"); del_hook(HOOK_MATCH_NOTEREJ, (Function) match_note_ignore); del_hook(HOOK_HOURLY, (Function) notes_hourly); del_entry_type(&USERENTRY_FWD); del_lang_section("notes"); module_undepend(MODULE_NAME); return NULL; }