예제 #1
0
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;
}
예제 #2
0
파일: assoc.c 프로젝트: Protospace/protobot
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;
}
예제 #3
0
파일: wire.c 프로젝트: Protospace/protobot
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;
}
예제 #4
0
파일: notes.c 프로젝트: ArNz8o8/Fr3shness
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;
}