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 *compress_close() { rem_help_reference("compress.help"); rem_tcl_commands(my_tcl_cmds); rem_tcl_ints(my_tcl_ints); uff_deltable(compress_uff_table); module_undepend(MODULE_NAME); return NULL; }
static char *assoc_close() { kill_all_assoc(); rem_builtins(H_dcc, mydcc); rem_builtins(H_bot, mybot); rem_builtins(H_link, mylink); rem_tcl_commands(mytcl); rem_help_reference("assoc.help"); del_lang_section("assoc"); module_undepend(MODULE_NAME); return NULL; }
static char *seen_close() { p_tcl_bind_list H_temp; rem_builtins(H_load, seen_load); rem_builtins(H_dcc, seen_dcc); rem_help_reference("seen.help"); if ((H_temp = find_bind_table("pub"))) rem_builtins(H_temp, seen_pub); if ((H_temp = find_bind_table("msg"))) rem_builtins(H_temp, seen_msg); 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 *wire_close() { wire_list *w = wirelist; char wiretmp[512]; char *enctmp; p_tcl_bind_list H_temp; /* Remove any current wire encrypt bindings for now, don't worry * about duplicate unbinds. */ while (w) { enctmp = encrypt_string(w->key, "wire"); sprintf(wiretmp, "!wire%s", enctmp); nfree(enctmp); wire_bot[0].name = wiretmp; wire_bot[0].flags = ""; wire_bot[0].func = (IntFunc) wire_filter; rem_builtins(H_bot, wire_bot); w = w->next; } w = wirelist; while (w && w->sock) { dprintf(findanyidx(w->sock), "----- %s\n", WIRE_UNLOAD); dprintf(findanyidx(w->sock), "----- %s\n", WIRE_NOLONGERWIRED); wire_leave(w->sock); w = wirelist; } rem_help_reference("wire.help"); rem_builtins(H_dcc, wire_dcc); H_temp = find_bind_table("filt"); rem_builtins(H_temp, wire_filt); H_temp = find_bind_table("chof"); rem_builtins(H_temp, wire_chof); del_lang_section("wire"); 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; }