Просмотр исходного кода

* Removed all mod_close() functions
* Fixed do_restart to just rehash()
* Fixed a bug in remote command system, was sending back idx instead of ridx


svn: 194

Bryan Drewery 22 лет назад
Родитель
Сommit
f336eb1dde

+ 13 - 14
src/botcmd.c

@@ -1457,20 +1457,6 @@ botcmd_t C_bot[] =
   {NULL,		NULL}
   {NULL,		NULL}
 };
 };
 
 
-
-void bounce_simul(int idx, char *buf)
-{
-  char rmsg[SGRAB-110];
-
-  if (!buf || !buf[0] || !dcc[idx].simulbot || !dcc[idx].simulbot[0] || idx < 0) {
-    return;
-  }
-
-  snprintf(rmsg, sizeof rmsg, "r-sr %d %s", idx, buf);          /* remote-simul[r]eturn idx buf */
-
-  putbot(dcc[idx].simulbot, rmsg);
-}
-
 void send_remote_simul(int idx, char *bot, char *cmd, char *par)
 void send_remote_simul(int idx, char *bot, char *cmd, char *par)
 {
 {
   char msg[SGRAB-110];
   char msg[SGRAB-110];
@@ -1523,6 +1509,19 @@ static void bot_rsim(char *botnick, char *code, char *par)
   check_tcl_dcc(cmd, idx, par);
   check_tcl_dcc(cmd, idx, par);
 }
 }
 
 
+void bounce_simul(int idx, char *buf)
+{
+  char rmsg[SGRAB-110];
+
+  if (!buf || !buf[0] || !dcc[idx].simulbot || !dcc[idx].simulbot[0] || idx < 0) {
+    return;
+  }
+
+  snprintf(rmsg, sizeof rmsg, "r-sr %d %s", dcc[idx].ridx, buf);          /* remote-simul[r]eturn idx buf */
+
+  putbot(dcc[idx].simulbot, rmsg);
+}
+
 #ifdef HUB
 #ifdef HUB
 static void bot_rsimr(char *botnick, char *code, char *par)
 static void bot_rsimr(char *botnick, char *code, char *par)
 {
 {

+ 1 - 17
src/cmds.c

@@ -1665,26 +1665,10 @@ static void cmd_randstring(struct userrec *u, int idx, char *par)
   nfree(rand);
   nfree(rand);
 }
 }
 
 
-
 static void cmd_restart(struct userrec *u, int idx, char *par)
 static void cmd_restart(struct userrec *u, int idx, char *par)
 {
 {
-
   putlog(LOG_CMDS, "*", STR("#%s# restart"), dcc[idx].nick);
   putlog(LOG_CMDS, "*", STR("#%s# restart"), dcc[idx].nick);
-  if (!backgrd) {
-    dprintf(idx, STR("You cannot %srestart a bot when running -n (due to Tcl).\n"), dcc_prefix);
-    return;
-  }
-  dprintf(idx, STR("Restarting.\n"));
-#ifdef HUB
-  write_userfile(-1);
-#endif /* HUB */
-  putlog(LOG_MISC, "*", STR("Restarting ..."));
-Context;
-  wipe_timers(interp, &utimer);
-Context;
-  wipe_timers(interp, &timer);
-Context;
-  do_restart = idx;
+  dprintf(idx, STR("To restart just '%die'\n"), dcc_prefix);
 }
 }
 
 
 #ifdef HUB
 #ifdef HUB

+ 1 - 61
src/main.c

@@ -1923,68 +1923,8 @@ int main(int argc, char **argv)
       socket_cleanup = 0;	/* If we've been idle, cleanup & flush */
       socket_cleanup = 0;	/* If we've been idle, cleanup & flush */
     }
     }
 
 
-/* FIXME: do_restart */
     if (do_restart) {
     if (do_restart) {
-      if (do_restart == -2)
-	rehash();
-      else {
-	/* Unload as many modules as possible */
-	int f = 1;
-	module_entry *p;
-	Function x;
-	char xx[256];
-
- 	/* oops, I guess we should call this event before tcl is restarted */
-   	check_tcl_event("prerestart");
-
-	while (f) {
-	  f = 0;
-	  for (p = module_list; p != NULL; p = p->next) {
-	    dependancy *d = dependancy_list;
-	    int ok = 1;
-
-	    while (ok && d) {
-	      if (d->needed == p)
-		ok = 0;
-	      d = d->next;
-	    }
-	    if (ok) {
-	      strcpy(xx, p->name);
-	      if (module_unload(xx, botnetnick) == NULL) {
-		f = 1;
-		break;
-	      }
-	    }
-	  }
-	}
-
-	for (f = 0, p = module_list; p; p = p->next) {
-	  if (!strcmp(p->name, "eggdrop") || !strcmp(p->name, "encryption") ||
-	      !strcmp(p->name, "uptime"))
-	    f = 0;
-	  else 
-	    f = 1;
-	}
-	if (f)
-	  /* Should be only 3 modules now - eggdrop, encryption, and uptime */
-	  putlog(LOG_MISC, "*", MOD_STAGNANT);
-
-/* 	flushlogs(); */
-	kill_tcl();
-	init_tcl(argc, argv);
-
-	/* this resets our modules which we didn't unload (encryption and uptime) */
-	for (p = module_list; p; p = p->next) {
-	  if (p->funcs) {
-	    x = p->funcs[MODCALL_START];
-	    x(NULL);
-	  }
-	}
-
-	rehash();
-	restart_chons();
-	call_hook(HOOK_LOADED);
-      }
+      rehash();
       do_restart = 0;
       do_restart = 0;
     }
     }
   }
   }

+ 1 - 28
src/mod/channels.mod/channels.c

@@ -878,40 +878,13 @@ static tcl_strings my_tcl_strings[] =
   {NULL,		NULL,		0,	0}
   {NULL,		NULL,		0,	0}
 };
 };
 
 
-static char *channels_close()
-{
-  free_udef(udef);
-  if (lastdeletedmask)
-    nfree(lastdeletedmask);
-  rem_builtins(H_chon, my_chon);
-  rem_builtins(H_bot, channels_bot);
-  rem_builtins_dcc(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_HOURLY, (Function) warn_pls_take);
-  del_hook(HOOK_MINUTELY, (Function) check_expired_bans);
-#ifdef S_IRCNET
-  del_hook(HOOK_MINUTELY, (Function) check_expired_exempts);
-  del_hook(HOOK_MINUTELY, (Function) check_expired_invites);
-#endif
-  del_hook(HOOK_3SECONDLY, (Function) channels_checkslowjoin);
-  Tcl_UntraceVar(interp, "global-chanset",
-		 TCL_TRACE_READS | TCL_TRACE_WRITES | TCL_TRACE_UNSETS,
-		 traced_globchanset, NULL);
-  module_undepend(MODULE_NAME);
-  return NULL;
-}
-
 EXPORT_SCOPE char *channels_start();
 EXPORT_SCOPE char *channels_start();
 
 
 static Function channels_table[] =
 static Function channels_table[] =
 {
 {
   /* 0 - 3 */
   /* 0 - 3 */
   (Function) channels_start,
   (Function) channels_start,
-  (Function) channels_close,
+  (Function) NULL,
   (Function) channels_expmem,
   (Function) channels_expmem,
   (Function) channels_report,
   (Function) channels_report,
   /* 4 - 7 */
   /* 4 - 7 */

+ 1 - 11
src/mod/compress.mod/compress.c

@@ -385,23 +385,13 @@ static int compress_report(int idx, int details)
   return 0;
   return 0;
 }
 }
 
 
-static char *compress_close()
-{
-  rem_tcl_commands(my_tcl_cmds);
-  rem_tcl_ints(my_tcl_ints);
-  uff_deltable(compress_uff_table);
-
-  module_undepend(MODULE_NAME);
-  return NULL;
-}
-
 EXPORT_SCOPE char *compress_start();
 EXPORT_SCOPE char *compress_start();
 
 
 static Function compress_table[] =
 static Function compress_table[] =
 {
 {
   /* 0 - 3 */
   /* 0 - 3 */
   (Function) compress_start,
   (Function) compress_start,
-  (Function) compress_close,
+  (Function) NULL,
   (Function) compress_expmem,
   (Function) compress_expmem,
   (Function) compress_report,
   (Function) compress_report,
   /* 4 - 7 */
   /* 4 - 7 */

+ 1 - 11
src/mod/console.mod/console.c

@@ -378,22 +378,12 @@ static dcc_cmd_t mydcc[] =
   {NULL,	NULL,	NULL,			NULL,        NULL}
   {NULL,	NULL,	NULL,			NULL,        NULL}
 };
 };
 
 
-static char *console_close()
-{
-  rem_builtins(H_chon, mychon);
-  rem_builtins_dcc(H_dcc, mydcc);
-  rem_tcl_ints(myints);
-  del_entry_type(&USERENTRY_CONSOLE);
-  module_undepend(MODULE_NAME);
-  return NULL;
-}
-
 EXPORT_SCOPE char *console_start();
 EXPORT_SCOPE char *console_start();
 
 
 static Function console_table[] =
 static Function console_table[] =
 {
 {
   (Function) console_start,
   (Function) console_start,
-  (Function) console_close,
+  (Function) NULL,
   (Function) NULL,
   (Function) NULL,
   (Function) NULL,
   (Function) NULL,
   (Function) console_dostore,
   (Function) console_dostore,

+ 1 - 10
src/mod/ctcp.mod/ctcp.c

@@ -757,21 +757,12 @@ struct cfg_entry CFG_CLOAK_SCRIPT = {
 };
 };
 
 
 
 
-static char *ctcp_close()
-{
-#ifdef LEAF
-  rem_builtins(H_ctcp, myctcp);
-#endif
-  module_undepend(MODULE_NAME);
-  return NULL;
-}
-
 EXPORT_SCOPE char *ctcp_start();
 EXPORT_SCOPE char *ctcp_start();
 
 
 static Function ctcp_table[] =
 static Function ctcp_table[] =
 {
 {
   (Function) ctcp_start,
   (Function) ctcp_start,
-  (Function) ctcp_close,
+  (Function) NULL,
   (Function) NULL,
   (Function) NULL,
   (Function) NULL,
   (Function) NULL,
 };
 };

+ 1 - 23
src/mod/dns.mod/dns.c

@@ -145,35 +145,13 @@ static int dns_report(int idx, int details)
   return 0;
   return 0;
 }
 }
 
 
-static char *dns_close()
-{
-  int i;
-
-  del_hook(HOOK_DNS_HOSTBYIP, (Function) dns_lookup);
-  del_hook(HOOK_DNS_IPBYHOST, (Function) dns_forward);
-  del_hook(HOOK_SECONDLY, (Function) dns_check_expires);
-
-  for (i = 0; i < dcc_total; i++) {
-    if (dcc[i].type == &DCC_DNS &&
-	dcc[i].sock == resfd) {
-      killsock(dcc[i].sock);
-      lostdcc(i);
-      break;
-    }
-  }
-
-  dns_free_cache();
-  module_undepend(MODULE_NAME);
-  return NULL;
-}
-
 EXPORT_SCOPE char *dns_start();
 EXPORT_SCOPE char *dns_start();
 
 
 static Function dns_table[] =
 static Function dns_table[] =
 {
 {
   /* 0 - 3 */
   /* 0 - 3 */
   (Function) dns_start,
   (Function) dns_start,
-  (Function) dns_close,
+  (Function) NULL,
   (Function) dns_expmem,
   (Function) dns_expmem,
   (Function) dns_report,
   (Function) dns_report,
   /* 4 - 7 */
   /* 4 - 7 */

+ 1 - 46
src/mod/irc.mod/irc.c

@@ -1668,58 +1668,13 @@ static void irc_10secondly() {
       channel_check_locked(ch);
       channel_check_locked(ch);
 }
 }
 
 
-
-static char *irc_close()
-{
-  struct chanset_t *chan;
-
-  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_ints(myints);
-  rem_builtins(H_bot, irc_bot);
-  rem_builtins_dcc(H_dcc, irc_dcc);
-  rem_builtins(H_msg, C_msg);
-#ifdef S_AUTH
-  rem_builtins(H_msgc, C_msgc);
-#endif /* S_AUTH */
-  rem_builtins(H_raw, irc_raw);
-  rem_tcl_commands(tclchan_cmds);
-  del_hook(HOOK_MINUTELY, (Function) check_expired_chanstuff);
-  del_hook(HOOK_MINUTELY, (Function) check_servers);
-  del_hook(HOOK_ADD_MODE, (Function) real_add_mode);
-  del_hook(HOOK_IDLE, (Function) flush_modes);
-  del_hook(HOOK_3SECONDLY, (Function) getin_3secondly);
-  del_hook(HOOK_10SECONDLY, (Function) irc_10secondly);
-  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;
-}
-
 EXPORT_SCOPE char *irc_start();
 EXPORT_SCOPE char *irc_start();
 
 
 static Function irc_table[] =
 static Function irc_table[] =
 {
 {
   /* 0 - 3 */
   /* 0 - 3 */
   (Function) irc_start,
   (Function) irc_start,
-  (Function) irc_close,
+  (Function) NULL,
   (Function) irc_expmem,
   (Function) irc_expmem,
   (Function) irc_report,
   (Function) irc_report,
   /* 4 - 7 */
   /* 4 - 7 */

+ 1 - 1
src/mod/modvals.h

@@ -61,7 +61,7 @@
 /* These are FIXED once they are in a release they STAY
 /* These are FIXED once they are in a release they STAY
  */
  */
 #define MODCALL_START		  0
 #define MODCALL_START		  0
-#define MODCALL_CLOSE		  1
+/* #define MODCALL_CLOSE		  1 */
 #define MODCALL_EXPMEM		  2
 #define MODCALL_EXPMEM		  2
 #define MODCALL_REPORT		  3
 #define MODCALL_REPORT		  3
 /* Filesys */
 /* Filesys */

+ 1 - 24
src/mod/notes.mod/notes.c

@@ -1149,29 +1149,6 @@ static cmd_t notes_load[] =
   {NULL,	NULL,	NULL,				NULL}
   {NULL,	NULL,	NULL,				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_dcc(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);
-  del_hook(HOOK_MATCH_NOTEREJ, (Function) match_note_ignore);
-  del_hook(HOOK_HOURLY, (Function) notes_hourly);
-  del_entry_type(&USERENTRY_FWD);
-  module_undepend(MODULE_NAME);
-  return NULL;
-}
-
 static int notes_expmem()
 static int notes_expmem()
 {
 {
   return 0;
   return 0;
@@ -1192,7 +1169,7 @@ EXPORT_SCOPE char *notes_start();
 static Function notes_table[] =
 static Function notes_table[] =
 {
 {
   (Function) notes_start,
   (Function) notes_start,
-  (Function) notes_close,
+  (Function) NULL,
   (Function) notes_expmem,
   (Function) notes_expmem,
   (Function) notes_report,
   (Function) notes_report,
   (Function) cmd_note,
   (Function) cmd_note,

+ 1 - 52
src/mod/server.mod/server.c

@@ -1900,63 +1900,12 @@ static cmd_t my_ctcps[] =
   {NULL,	NULL,	NULL,			NULL}
   {NULL,	NULL,	NULL,			NULL}
 };
 };
 
 
-static char *server_close()
-{
-  cycle_time = 100;
-  nuke_server("Connection reset by peer");
-  clearq(serverlist);
-  rem_builtins_dcc(H_dcc, C_dcc_serv);
-  rem_builtins(H_raw, my_raw_binds);
-  rem_builtins(H_ctcp, my_ctcps);
-  /* Restore original commands. */
-  del_bind_table(H_wall);
-  del_bind_table(H_raw);
-  del_bind_table(H_notc);
-  del_bind_table(H_msgm);
-  del_bind_table(H_msg);
-  del_bind_table(H_flud);
-  del_bind_table(H_ctcr);
-  del_bind_table(H_ctcp);
-  rem_tcl_coups(my_tcl_coups);
-  rem_tcl_strings(my_tcl_strings);
-  rem_tcl_ints(my_tcl_ints);
-  rem_tcl_commands(my_tcl_cmds);
-  Tcl_UntraceVar(interp, "nick",
-		 TCL_TRACE_READS | TCL_TRACE_WRITES | TCL_TRACE_UNSETS,
-		 nick_change, NULL);
-  Tcl_UntraceVar(interp, "altnick",
-		 TCL_TRACE_WRITES | TCL_TRACE_UNSETS, altnick_change, NULL);
-  Tcl_UntraceVar(interp, "botname",
-		 TCL_TRACE_READS | TCL_TRACE_WRITES | TCL_TRACE_UNSETS,
-		 traced_botname, NULL);
-  Tcl_UntraceVar(interp, "server",
-		 TCL_TRACE_READS | TCL_TRACE_WRITES | TCL_TRACE_UNSETS,
-		 traced_server, NULL);
-  Tcl_UntraceVar(interp, "net-type",
-		 TCL_TRACE_READS | TCL_TRACE_WRITES | TCL_TRACE_UNSETS,
-		 traced_nettype, NULL);
-  Tcl_UntraceVar(interp, "nick-len",
-		 TCL_TRACE_READS | TCL_TRACE_WRITES | TCL_TRACE_UNSETS,
-		 traced_nicklen, NULL);
-//  tcl_untraceserver("servers", NULL);
-  empty_msgq();
-  del_hook(HOOK_SECONDLY, (Function) server_secondly);
-  del_hook(HOOK_5MINUTELY, (Function) server_5minutely);
-  del_hook(HOOK_QSERV, (Function) queue_server);
-  del_hook(HOOK_MINUTELY, (Function) minutely_checks);
-  del_hook(HOOK_PRE_REHASH, (Function) server_prerehash);
-  del_hook(HOOK_REHASH, (Function) server_postrehash);
-  del_hook(HOOK_DIE, (Function) server_die);
-  module_undepend(MODULE_NAME);
-  return NULL;
-}
-
 EXPORT_SCOPE char *server_start();
 EXPORT_SCOPE char *server_start();
 
 
 static Function server_table[] =
 static Function server_table[] =
 {
 {
   (Function) server_start,
   (Function) server_start,
-  (Function) server_close,
+  (Function) NULL,
   (Function) server_expmem,
   (Function) server_expmem,
   (Function) server_report,
   (Function) server_report,
   /* 4 - 7 */
   /* 4 - 7 */

+ 1 - 36
src/mod/share.mod/share.c

@@ -2109,41 +2109,6 @@ static tcl_ints my_ints[] =
 };
 };
 
 
 static tcl_strings my_strings[] =
 static tcl_strings my_strings[] =
-static char *share_close()
-{
-  int i;
-  tandbuf *t, *tnext = NULL;
-
-  module_undepend(MODULE_NAME);
-  putlog(LOG_MISC | LOG_BOTS, "@", "Sending 'share end' to all sharebots...");
-  for (i = 0; i < dcc_total; i++)
-    if ((dcc[i].type->flags & DCT_BOT) && (dcc[i].status & STAT_SHARE)) {
-      dprintf(i, "s e Unload module\n");
-      cancel_user_xfer(-i, 0);
-      updatebot(-1, dcc[i].nick, '-', 0);
-      dcc[i].status &= ~(STAT_SHARE | STAT_GETTING | STAT_SENDING |
-			 STAT_OFFERED | STAT_AGGRESSIVE);
-      dcc[i].u.bot->uff_flags = 0;
-    }
-  putlog(LOG_MISC | LOG_BOTS, "@", "Unloaded sharing module, flushing tbuf's...");
-  for (t = tbuf; t; t = tnext) {
-    tnext = t->next; 
-    del_tbuf(t);                                  
-  }  
-  del_hook(HOOK_SHAREOUT, (Function) shareout_mod);
-  del_hook(HOOK_SHAREIN, (Function) sharein_mod);
-  del_hook(HOOK_MINUTELY, (Function) check_expired_tbufs);
-  del_hook(HOOK_READ_USERFILE, (Function) hook_read_userfile);
-  del_hook(HOOK_SECONDLY, (Function) check_delay);
-  DCC_BOT.kill = def_dcc_bot_kill;
-  uff_deltable(internal_uff_table);
-  delay_free_mem();
-  rem_tcl_ints(my_ints);
-  rem_tcl_strings(my_strings);
-  rem_builtins(H_dcc, my_cmds);
-  return NULL;
-}
-
 {
 {
   {"private-globals",	private_globals,	50,	0},
   {"private-globals",	private_globals,	50,	0},
   {NULL,		NULL,			0,	0}
   {NULL,		NULL,			0,	0}
@@ -2222,7 +2187,7 @@ static void share_report(int idx, int details)
 			(int) (100.0 * ((float) dcc[j].status) /
 			(int) (100.0 * ((float) dcc[j].status) /
 			       ((float) dcc[j].u.xfer->length)));
 			       ((float) dcc[j].u.xfer->length)));
 	      else
 	      else
-  (Function) share_close,
+		dprintf(idx,
 			"Sending userlist to %s (waiting for connect)\n",
 			"Sending userlist to %s (waiting for connect)\n",
 			dcc[i].nick);
 			dcc[i].nick);
 	    }
 	    }

+ 1 - 32
src/mod/transfer.mod/transfer.c

@@ -2014,37 +2014,6 @@ static cmd_t transfer_load[] =
  *   Module functions
  *   Module functions
  */
  */
 
 
-static char *transfer_close()
-{
-  int i;
-  p_tcl_bind_list H_ctcp;
-
-Context;
-  putlog(LOG_MISC, "*",TRANSFER_UNLOADING);
-  for (i = dcc_total - 1; i >= 0; i--) {
-    if (dcc[i].type == &DCC_GET || dcc[i].type == &DCC_GET_PENDING)
-      eof_dcc_get(i);
-    else if (dcc[i].type == &DCC_SEND)
-      eof_dcc_send(i);
-    else if (dcc[i].type == &DCC_FORK_SEND)
-      eof_dcc_fork_send(i);
-  }
-  while (fileq)
-    deq_this(fileq);
-  del_entry_type(&USERENTRY_FSTAT);
-  del_bind_table(H_rcvd);
-  del_bind_table(H_sent);
-  del_bind_table(H_lost);
-  del_bind_table(H_tout);
-  rem_builtins(H_load, transfer_load);
-  /* Try to remove our CTCP bindings */
-  if ((H_ctcp = find_bind_table("ctcp")))
-    rem_builtins(H_ctcp, transfer_ctcps);
-  rem_tcl_commands(mytcls);
-  rem_tcl_ints(myints);
-  module_undepend(MODULE_NAME);
-  return NULL;
-}
 
 
 static int transfer_expmem()
 static int transfer_expmem()
 {
 {
@@ -2065,7 +2034,7 @@ EXPORT_SCOPE char *transfer_start();
 static Function transfer_table[] =
 static Function transfer_table[] =
 {
 {
   (Function) transfer_start,
   (Function) transfer_start,
-  (Function) transfer_close,
+  (Function) NULL,
   (Function) transfer_expmem,
   (Function) transfer_expmem,
   (Function) transfer_report,
   (Function) transfer_report,
   /* 4- 7 */
   /* 4- 7 */

+ 1 - 14
src/mod/update.mod/update.c

@@ -441,19 +441,6 @@ static void check_updates()
 }
 }
 #endif
 #endif
 
 
-static char *update_close()
-{
-  module_undepend(MODULE_NAME);
-  rem_builtins(H_bot, update_bot);
-#ifdef HUB
-  del_hook(HOOK_30SECONDLY, (Function) check_updates);
-#endif
-  del_hook(HOOK_SHAREUPDATEIN, (Function) updatein_mod);
-  DCC_BOT.kill = def_dcc_bot_kill;
-  //uff_deltable(internal_uff_table);
-  return NULL;
-}
-
 static int update_expmem()
 static int update_expmem()
 {
 {
   int tot = 0;
   int tot = 0;
@@ -513,7 +500,7 @@ static Function update_table[] =
 {
 {
   /* 0 - 3 */
   /* 0 - 3 */
   (Function) update_start,
   (Function) update_start,
-  (Function) update_close,
+  (Function) NULL,
   (Function) update_expmem,
   (Function) update_expmem,
   (Function) update_report,
   (Function) update_report,
   /* 4 - 7 */
   /* 4 - 7 */

+ 1 - 40
src/modules.c

@@ -519,7 +519,7 @@ Function global_table[] =
   /* 273 - 276 */
   /* 273 - 276 */
   (Function) quit_msg,		/* char *				*/
   (Function) quit_msg,		/* char *				*/
   (Function) module_load,
   (Function) module_load,
-  (Function) module_unload,
+  (Function) 0,
   (Function) & parties,		/* int					*/
   (Function) & parties,		/* int					*/
   /* 277 - 280 */
   /* 277 - 280 */
   (Function) ischanhub,        
   (Function) ischanhub,        
@@ -703,45 +703,6 @@ const char *module_load(char *name)
   return NULL;
   return NULL;
 }
 }
 
 
-char *module_unload(char *name, char *user)
-{
-  module_entry *p = module_list, *o = NULL;
-  char *e;
-  Function *f;
-
-  while (p) {
-    if ((p->name != NULL) && (!strcmp(name, p->name))) {
-      dependancy *d;
-
-      for (d = dependancy_list; d; d = d->next)  
-	if (d->needed == p)
-	  return MOD_NEEDED;
-
-      f = p->funcs;
-      if (f && !f[MODCALL_CLOSE])
-	return MOD_NOCLOSEDEF;
-      if (f) {
-	check_tcl_unld(name);
-	e = (((char *(*)()) f[MODCALL_CLOSE]) (user));
-	if (e != NULL)
-	  return e;
-      }
-      nfree(p->name);
-      if (o == NULL) {
-	module_list = p->next;
-      } else {
-	o->next = p->next;
-      }
-      nfree(p);
-      putlog(LOG_MISC, "*", "%s %s", MOD_UNLOADED, name);
-      return NULL;
-    }
-    o = p;
-    p = p->next;
-  }
-  return MOD_NOSUCH;
-}
-
 module_entry *module_find(char *name, int major, int minor)
 module_entry *module_find(char *name, int major, int minor)
 {
 {
   module_entry *p;
   module_entry *p;

+ 0 - 3
src/proto.h

@@ -76,9 +76,6 @@ int partynick(char *, int, char *);
 int partyidle(char *, char *);
 int partyidle(char *, char *);
 void partysetidle(char *, int, int);
 void partysetidle(char *, int, int);
 void partyaway(char *, int, char *);
 void partyaway(char *, int, char *);
-#ifdef HUB
-void botnet_send_limitcheck(struct chanset_t * chan);
-#endif
 #ifdef S_DCCPASS
 #ifdef S_DCCPASS
 void botnet_send_cmdpass(int, char *, char *);
 void botnet_send_cmdpass(int, char *, char *);
 #endif
 #endif