Explorar o código

* Reverted dcc_cmd_t to cmd_t

svn: 211
Bryan Drewery %!s(int64=22) %!d(string=hai) anos
pai
achega
041c4476d3

+ 100 - 100
src/cmds.c

@@ -3863,139 +3863,139 @@ static void cmd_whoami(struct userrec *u, int idx, char *par)
  *   int cmd_whatever(idx,"parameters");
  *   int cmd_whatever(idx,"parameters");
  * As with msg commands, function is responsible for any logging.
  * As with msg commands, function is responsible for any logging.
  */
  */
-dcc_cmd_t C_dcc[] =
+cmd_t C_dcc[] =
 {
 {
-  {"+host",		"m|m",	(Function) cmd_pls_host,	NULL,    NULL},
-  {"+ignore",		"m",	(Function) cmd_pls_ignore,	NULL,    NULL},
-  {"+user",		"m",	(Function) cmd_pls_user,	NULL,    NULL},
+  {"+host",		"m|m",	(Function) cmd_pls_host,	NULL},
+  {"+ignore",		"m",	(Function) cmd_pls_ignore,	NULL},
+  {"+user",		"m",	(Function) cmd_pls_user,	NULL},
 #ifdef HUB
 #ifdef HUB
-  {"-bot",		"a",	(Function) cmd_mns_user,	NULL,    NULL},
+  {"-bot",		"a",	(Function) cmd_mns_user,	NULL},
 #endif /* HUB */
 #endif /* HUB */
-  {"-host",		"",	(Function) cmd_mns_host,	NULL,    NULL},
-  {"-ignore",		"m",	(Function) cmd_mns_ignore,	NULL,    NULL},
-  {"-user",		"m",	(Function) cmd_mns_user,	NULL,    NULL},
-  {"addlog",		"mo|o",	(Function) cmd_addlog,		NULL,    NULL},
-/*  {"putlog",		"mo|o",	(Function) cmd_addlog,		NULL,	 NULL}, */
-  {"about",		"",	(Function) cmd_about,		NULL,    NULL},
-  {"away",		"",	(Function) cmd_away,		NULL,    NULL},
-  {"back",		"",	(Function) cmd_back,		NULL,    NULL},
+  {"-host",		"",	(Function) cmd_mns_host,	NULL},
+  {"-ignore",		"m",	(Function) cmd_mns_ignore,	NULL},
+  {"-user",		"m",	(Function) cmd_mns_user,	NULL},
+  {"addlog",		"mo|o",	(Function) cmd_addlog,		NULL},
+/*  {"putlog",		"mo|o",	(Function) cmd_addlog,		NULL}, */
+  {"about",		"",	(Function) cmd_about,		NULL},
+  {"away",		"",	(Function) cmd_away,		NULL},
+  {"back",		"",	(Function) cmd_back,		NULL},
 #ifdef HUB
 #ifdef HUB
-  {"backup",		"m|m",	(Function) cmd_backup,		NULL,    NULL},
-  {"binds",		"a",	(Function) cmd_binds,		NULL,    NULL},
-  {"boot",		"m",	(Function) cmd_boot,		NULL,    NULL},
-  {"botconfig",		"n",	(Function) cmd_botconfig,	NULL,    NULL},
-  {"botinfo",		"",	(Function) cmd_botinfo,		NULL,    NULL},
-  {"bots",		"m",	(Function) cmd_bots,		NULL,    NULL},
-  {"downbots",		"m",	(Function) cmd_downbots,	NULL,	 NULL},
-  {"bottree",		"n",	(Function) cmd_bottree,		NULL,    NULL},
-  {"chaddr",		"a",	(Function) cmd_chaddr,		NULL,    NULL},
+  {"backup",		"m|m",	(Function) cmd_backup,		NULL},
+  {"binds",		"a",	(Function) cmd_binds,		NULL},
+  {"boot",		"m",	(Function) cmd_boot,		NULL},
+  {"botconfig",		"n",	(Function) cmd_botconfig,	NULL},
+  {"botinfo",		"",	(Function) cmd_botinfo,		NULL},
+  {"bots",		"m",	(Function) cmd_bots,		NULL},
+  {"downbots",		"m",	(Function) cmd_downbots,	NULL},
+  {"bottree",		"n",	(Function) cmd_bottree,		NULL},
+  {"chaddr",		"a",	(Function) cmd_chaddr,		NULL},
 #endif /* HUB */
 #endif /* HUB */
-  {"chat",		"",	(Function) cmd_chat,		NULL,    NULL},
-  {"chattr",		"m|m",	(Function) cmd_chattr,		NULL,	 NULL},
+  {"chat",		"",	(Function) cmd_chat,		NULL},
+  {"chattr",		"m|m",	(Function) cmd_chattr,		NULL},
 #ifdef HUB
 #ifdef HUB
-  {"chhandle",		"m",	(Function) cmd_chhandle,	NULL,    NULL},
-  {"chnick",		"m",	(Function) cmd_chhandle,	NULL,    NULL},
-  {"chpass",		"m",	(Function) cmd_chpass,		NULL,    NULL},
-  {"chsecpass",		"n",	(Function) cmd_chsecpass,		NULL,    NULL},
+  {"chhandle",		"m",	(Function) cmd_chhandle,	NULL},
+  {"chnick",		"m",	(Function) cmd_chhandle,	NULL},
+  {"chpass",		"m",	(Function) cmd_chpass,		NULL},
+  {"chsecpass",		"n",	(Function) cmd_chsecpass,	NULL},
 #ifdef S_DCCPASS
 #ifdef S_DCCPASS
-  {"cmdpass",           "a",    (Function) cmd_cmdpass,         NULL,    NULL},
+  {"cmdpass",           "a",    (Function) cmd_cmdpass,         NULL},
 #endif /* S_DCCPASS */
 #endif /* S_DCCPASS */
 #endif /* HUB */
 #endif /* HUB */
-  {"color",		"",     (Function) cmd_color,           NULL,    NULL},
-  {"comment",		"m|m",	(Function) cmd_comment,		NULL,    NULL},
+  {"color",		"",     (Function) cmd_color,           NULL},
+  {"comment",		"m|m",	(Function) cmd_comment,		NULL},
 #ifdef HUB
 #ifdef HUB
-  {"config",		"n",	(Function) cmd_config,		NULL,    NULL},
+  {"config",		"n",	(Function) cmd_config,		NULL},
 #endif /* HUB */
 #endif /* HUB */
-  {"console",		"-|-",	(Function) cmd_console,		NULL,    NULL},
+  {"console",		"-|-",	(Function) cmd_console,		NULL},
 #ifdef HUB
 #ifdef HUB
-  {"dccstat",		"a",	(Function) cmd_dccstat,		NULL,    NULL},
+  {"dccstat",		"a",	(Function) cmd_dccstat,		NULL},
 #endif /* HUB */
 #endif /* HUB */
-  {"debug",		"a",	(Function) cmd_debug,		NULL,    NULL},
-  {"die",		"n",	(Function) cmd_die,		NULL,    NULL},
-  {"echo",		"",	(Function) cmd_echo,		NULL,    NULL},
-  {"fixcodes",		"",	(Function) cmd_fixcodes,	NULL,    NULL},
-  {"handle",		"",	(Function) cmd_handle,		NULL,    NULL},
-  {"help",		"-|-",	(Function) cmd_help,		NULL,    NULL},
-  {"ignores",		"m",	(Function) cmd_ignores,		NULL,    NULL},
+  {"debug",		"a",	(Function) cmd_debug,		NULL},
+  {"die",		"n",	(Function) cmd_die,		NULL},
+  {"echo",		"",	(Function) cmd_echo,		NULL},
+  {"fixcodes",		"",	(Function) cmd_fixcodes,	NULL},
+  {"handle",		"",	(Function) cmd_handle,		NULL},
+  {"help",		"-|-",	(Function) cmd_help,		NULL},
+  {"ignores",		"m",	(Function) cmd_ignores,		NULL},
 #ifdef HUB
 #ifdef HUB
-  {"link",		"n",	(Function) cmd_link,		NULL,    NULL},
+  {"link",		"n",	(Function) cmd_link,		NULL},
 #endif /* HUB */
 #endif /* HUB */
-  {"match",		"m|m",	(Function) cmd_match,		NULL,    NULL},
-  {"me",		"",	(Function) cmd_me,		NULL,    NULL},
-  {"motd",		"",	(Function) cmd_motd,		NULL,    NULL},
+  {"match",		"m|m",	(Function) cmd_match,		NULL},
+  {"me",		"",	(Function) cmd_me,		NULL},
+  {"motd",		"",	(Function) cmd_motd,		NULL},
 #ifdef HUB
 #ifdef HUB
 #ifdef S_TCLCMDS
 #ifdef S_TCLCMDS
-  {"nettcl",		"a",	(Function) cmd_nettcl,		NULL,    NULL},
+  {"nettcl",		"a",	(Function) cmd_nettcl,		NULL},
 #endif /* S_TCLCMDS */
 #endif /* S_TCLCMDS */
-  {"newleaf",		"n",	(Function) cmd_newleaf,		NULL,    NULL},
+  {"newleaf",		"n",	(Function) cmd_newleaf,		NULL},
 #endif /* HUB */
 #endif /* HUB */
-  {"newpass",		"",	(Function) cmd_newpass,		NULL,    NULL},
-  {"secpass",		"",	(Function) cmd_secpass,		NULL,    NULL},
-  {"nick",		"",	(Function) cmd_handle,		NULL,    NULL},
-  {"page",		"",	(Function) cmd_page,		NULL,    NULL},
-  {"quit",		"",	(Function) NULL,		NULL,    NULL},
-  {"relay",		"i",	(Function) cmd_relay,		NULL,    NULL},
+  {"newpass",		"",	(Function) cmd_newpass,		NULL},
+  {"secpass",		"",	(Function) cmd_secpass,		NULL},
+  {"nick",		"",	(Function) cmd_handle,		NULL},
+  {"page",		"",	(Function) cmd_page,		NULL},
+  {"quit",		"",	(Function) NULL,		NULL},
+  {"relay",		"i",	(Function) cmd_relay,		NULL},
 #ifdef HUB
 #ifdef HUB
-  {"reload",		"m|m",	(Function) cmd_reload,		NULL,    NULL},
+  {"reload",		"m|m",	(Function) cmd_reload,		NULL},
 #endif /* HUB */
 #endif /* HUB */
-  {"restart",		"m",	(Function) cmd_restart,		NULL,    NULL},
+  {"restart",		"m",	(Function) cmd_restart,		NULL},
 #ifdef HUB
 #ifdef HUB
-  {"save",		"m|m",	(Function) cmd_save,		NULL,    NULL},
-  {"set",		"a",	(Function) cmd_set,		NULL,    NULL},
+  {"save",		"m|m",	(Function) cmd_save,		NULL},
+  {"set",		"a",	(Function) cmd_set,		NULL},
 #endif /* HUB */
 #endif /* HUB */
-  {"simul",		"a",	(Function) cmd_simul,		NULL,    NULL},
-  {"status",		"m|m",	(Function) cmd_status,		NULL,    NULL},
-  {"strip",		"",	(Function) cmd_strip,		NULL,    NULL},
-  {"su",		"a",	(Function) cmd_su,		NULL,    NULL},
+  {"simul",		"a",	(Function) cmd_simul,		NULL},
+  {"status",		"m|m",	(Function) cmd_status,		NULL},
+  {"strip",		"",	(Function) cmd_strip,		NULL},
+  {"su",		"a",	(Function) cmd_su,		NULL},
 #ifdef S_TCLCMDS 
 #ifdef S_TCLCMDS 
-  {"tcl",		"a",	(Function) cmd_tcl,		NULL,    NULL},
+  {"tcl",		"a",	(Function) cmd_tcl,		NULL},
 #endif /* S_TCLCMDS */
 #endif /* S_TCLCMDS */
 #ifdef HUB
 #ifdef HUB
-  {"trace",		"n",	(Function) cmd_trace,		NULL,    NULL},
+  {"trace",		"n",	(Function) cmd_trace,		NULL},
 #endif /* HUB */
 #endif /* HUB */
-  {"traffic",		"m",	(Function) cmd_traffic,		NULL,    NULL},
-  {"unlink",		"m",	(Function) cmd_unlink,		NULL,    NULL},
-  {"update",		"a",	(Function) cmd_update,		NULL,    NULL},
+  {"traffic",		"m",	(Function) cmd_traffic,		NULL},
+  {"unlink",		"m",	(Function) cmd_unlink,		NULL},
+  {"update",		"a",	(Function) cmd_update,		NULL},
 #ifdef HUB
 #ifdef HUB
-  {"netcrontab",	"a",	(Function) cmd_netcrontab,	NULL,    NULL},
+  {"netcrontab",	"a",	(Function) cmd_netcrontab,	NULL},
 #endif /* HUB */
 #endif /* HUB */
-  {"uptime",		"m|m",	(Function) cmd_uptime,		NULL,    NULL},
-  {"crontab",		"a",	(Function) cmd_crontab,		NULL,    NULL},
+  {"uptime",		"m|m",	(Function) cmd_uptime,		NULL},
+  {"crontab",		"a",	(Function) cmd_crontab,		NULL},
 #ifdef HUB
 #ifdef HUB
-  {"vbottree",		"n",	(Function) cmd_vbottree,	NULL,    NULL},
-  {"who",		"n",	(Function) cmd_who,		NULL,    NULL},
+  {"vbottree",		"n",	(Function) cmd_vbottree,	NULL},
+  {"who",		"n",	(Function) cmd_who,		NULL},
 #endif /* HUB */
 #endif /* HUB */
-  {"whois",		"",	(Function) cmd_whois,		NULL,    NULL},
-  {"whom",		"",	(Function) cmd_whom,		NULL,    NULL},
-  {"whoami",		"",	(Function) cmd_whoami,		NULL,    NULL},
-  {"botjump",           "n",    (Function) cmd_botjump,         NULL,    NULL},
-  {"botmsg",           "o",    (Function) cmd_botmsg,          NULL,    NULL},
-  {"netmsg", 		"n", 	(Function) cmd_netmsg, 		NULL,    NULL},
-  {"botnick", 		"m", 	(Function) cmd_botnick, 	NULL,    NULL},
-  {"netnick", 		"m", 	(Function) cmd_netnick, 	NULL,    NULL},
+  {"whois",		"",	(Function) cmd_whois,		NULL},
+  {"whom",		"",	(Function) cmd_whom,		NULL},
+  {"whoami",		"",	(Function) cmd_whoami,		NULL},
+  {"botjump",           "n",    (Function) cmd_botjump,         NULL},
+  {"botmsg",		"o",    (Function) cmd_botmsg,          NULL},
+  {"netmsg", 		"n", 	(Function) cmd_netmsg, 		NULL},
+  {"botnick", 		"m", 	(Function) cmd_botnick, 	NULL},
+  {"netnick", 		"m", 	(Function) cmd_netnick, 	NULL},
 #ifdef HUB
 #ifdef HUB
-  {"netw", 		"n", 	(Function) cmd_netw, 		NULL,    NULL},
-  {"netps", 		"n", 	(Function) cmd_netps, 		NULL,    NULL},
-  {"netlast", 		"n", 	(Function) cmd_netlast, 	NULL,    NULL},
+  {"netw", 		"n", 	(Function) cmd_netw, 		NULL},
+  {"netps", 		"n", 	(Function) cmd_netps, 		NULL},
+  {"netlast", 		"n", 	(Function) cmd_netlast, 	NULL},
 #endif /* HUB */
 #endif /* HUB */
-  {"netlag", 		"m", 	(Function) cmd_netlag, 		NULL,    NULL},
-  {"botserver",		"m",	(Function) cmd_botserver,	NULL,	 NULL},
-  {"netserver", 	"m", 	(Function) cmd_netserver, 	NULL,    NULL},
-  {"botversion", 	"o", 	(Function) cmd_botversion, 	NULL,    NULL},
-  {"netversion", 	"o", 	(Function) cmd_netversion, 	NULL,    NULL},
-  {"userlist", 		"m", 	(Function) cmd_userlist, NULL, NULL},
-  {"ps", 		"n", 	(Function) cmd_ps, NULL, NULL},
-  {"last", 		"n", 	(Function) cmd_last, NULL, NULL},
-  {"exec", 		"a", 	(Function) cmd_exec, NULL, NULL},
-  {"w", 		"n", 	(Function) cmd_w, NULL, NULL},
-  {"channels", 		"", 	(Function) cmd_channels, NULL, NULL},
-  {"randstring", 	"", 	(Function) cmd_randstring, NULL, NULL},
+  {"netlag", 		"m", 	(Function) cmd_netlag, 		NULL},
+  {"botserver",		"m",	(Function) cmd_botserver,	NULL},
+  {"netserver", 	"m", 	(Function) cmd_netserver, 	NULL},
+  {"botversion", 	"o", 	(Function) cmd_botversion, 	NULL},
+  {"netversion", 	"o", 	(Function) cmd_netversion, 	NULL},
+  {"userlist", 		"m", 	(Function) cmd_userlist, 	NULL},
+  {"ps", 		"n", 	(Function) cmd_ps, 		NULL},
+  {"last", 		"n", 	(Function) cmd_last, 		NULL},
+  {"exec", 		"a", 	(Function) cmd_exec, 		NULL},
+  {"w", 		"n", 	(Function) cmd_w, 		NULL},
+  {"channels", 		"", 	(Function) cmd_channels, 	NULL},
+  {"randstring", 	"", 	(Function) cmd_randstring, 	NULL},
 #ifdef HUB
 #ifdef HUB
-  {"botcmd",		"i",	(Function) cmd_botcmd, NULL, NULL},
-  {"bc",		"i",	(Function) cmd_botcmd, NULL, NULL},
-  {"hublevel", 		"a", 	(Function) cmd_hublevel, NULL, NULL},
-  {"lagged", 		"m", 	(Function) cmd_lagged, NULL, NULL},
-  {"uplink", 		"a", 	(Function) cmd_uplink, NULL, NULL},
+  {"botcmd",		"i",	(Function) cmd_botcmd, 		NULL},
+  {"bc",		"i",	(Function) cmd_botcmd, 		NULL},
+  {"hublevel", 		"a", 	(Function) cmd_hublevel, 	NULL},
+  {"lagged", 		"m", 	(Function) cmd_lagged, 		NULL},
+  {"uplink", 		"a", 	(Function) cmd_uplink, 		NULL},
 #endif /* HUB */
 #endif /* HUB */
-  {NULL,		NULL,	NULL,				NULL,    NULL, NULL}
+  {NULL,		NULL,	NULL,				NULL}
 };
 };

+ 0 - 10
src/cmdt.h

@@ -14,16 +14,6 @@ typedef struct {
   char *funcname;
   char *funcname;
 } cmd_t;
 } cmd_t;
 
 
-typedef struct {
-  char *name;
-  char *flags;
-  Function func;
-  char *usage;
-  char *desc;
-  char *funcname;
-} dcc_cmd_t;
-
-
 typedef struct {
 typedef struct {
   char *name;
   char *name;
   Function func;
   Function func;

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

@@ -1036,7 +1036,7 @@ char *channels_start(Function * global_funcs)
 	       TCL_TRACE_READS | TCL_TRACE_WRITES | TCL_TRACE_UNSETS,
 	       TCL_TRACE_READS | TCL_TRACE_WRITES | TCL_TRACE_UNSETS,
 	       traced_globchanset, NULL);
 	       traced_globchanset, NULL);
   add_builtins(H_chon, my_chon);
   add_builtins(H_chon, my_chon);
-  add_builtins_dcc(H_dcc, C_dcc_irc);
+  add_builtins(H_dcc, C_dcc_irc);
   add_builtins(H_bot, channels_bot);
   add_builtins(H_bot, channels_bot);
   add_tcl_commands(channels_cmds);
   add_tcl_commands(channels_cmds);
   add_tcl_strings(my_tcl_strings);
   add_tcl_strings(my_tcl_strings);

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

@@ -1732,36 +1732,36 @@ static void cmd_chanset(struct userrec *u, int idx, char *par)
  *
  *
  * NOTE: As with msg commands, the function is responsible for any logging.
  * NOTE: As with msg commands, the function is responsible for any logging.
  */
  */
-static dcc_cmd_t C_dcc_irc[] =
+static cmd_t C_dcc_irc[] =
 {
 {
-  {"+ban",	"o|o",	(Function) cmd_pls_ban,		NULL,        NULL},
+  {"+ban",	"o|o",	(Function) cmd_pls_ban,		NULL},
 #ifdef S_IRCNET
 #ifdef S_IRCNET
-  {"+exempt",	"o|o",	(Function) cmd_pls_exempt,	NULL,        NULL},
-  {"+invite",	"o|o",	(Function) cmd_pls_invite,	NULL,        NULL},
-#endif
-  {"+chan",	"n",	(Function) cmd_pls_chan,	NULL,        NULL},
-  {"+chrec",	"m|m",	(Function) cmd_pls_chrec,	NULL,        NULL},
-  {"-ban",	"o|o",	(Function) cmd_mns_ban,		NULL,        NULL},
-  {"-chan",	"n",	(Function) cmd_mns_chan,	NULL,        NULL},
-  {"-chrec",	"m|m",	(Function) cmd_mns_chrec,	NULL,        NULL},
+  {"+exempt",	"o|o",	(Function) cmd_pls_exempt,	NULL},
+  {"+invite",	"o|o",	(Function) cmd_pls_invite,	NULL},
+#endif /* S_IRCNET */
+  {"+chan",	"n",	(Function) cmd_pls_chan,	NULL},
+  {"+chrec",	"m|m",	(Function) cmd_pls_chrec,	NULL},
+  {"-ban",	"o|o",	(Function) cmd_mns_ban,		NULL},
+  {"-chan",	"n",	(Function) cmd_mns_chan,	NULL},
+  {"-chrec",	"m|m",	(Function) cmd_mns_chrec,	NULL},
 #ifdef S_IRCNET
 #ifdef S_IRCNET
-  {"-exempt",	"o|o",	(Function) cmd_mns_exempt,	NULL,        NULL},
-  {"-invite",	"o|o",	(Function) cmd_mns_invite,	NULL,        NULL},
-#endif
-  {"bans",	"o|o",	(Function) cmd_bans,		NULL,        NULL},
+  {"-exempt",	"o|o",	(Function) cmd_mns_exempt,	NULL},
+  {"-invite",	"o|o",	(Function) cmd_mns_invite,	NULL},
+#endif /* S_IRCNET */
+  {"bans",	"o|o",	(Function) cmd_bans,		NULL},
 #ifdef S_IRCNET
 #ifdef S_IRCNET
-  {"exempts",	"o|o",	(Function) cmd_exempts,		NULL,        NULL},
-  {"invites",	"o|o",	(Function) cmd_invites,		NULL,        NULL},
-#endif
-  {"chaninfo",	"m|m",	(Function) cmd_chaninfo,	NULL,        NULL},
-  {"chanset",	"m|m",	(Function) cmd_chanset,		NULL,        NULL},
-  {"chinfo",	"m|m",	(Function) cmd_chinfo,		NULL,        NULL},
-  {"cycle", 	"n|n",	(Function) cmd_cycle,		NULL,        NULL},
-  {"down",	"n|n",	(Function) cmd_down,		NULL,        NULL},
-  {"info",	"",	(Function) cmd_info,		NULL,        NULL},
-  {"slowjoin",  "n",    (Function) cmd_slowjoin,        NULL,        NULL},
-  {"slowpart",  "n|n",  (Function) cmd_slowpart,        NULL,        NULL},
-  {"stick",	"o|o",	(Function) cmd_stick,		NULL,        NULL},
-  {"unstick",	"o|o",	(Function) cmd_unstick,		NULL,        NULL},
-  {NULL,	NULL,	NULL,				NULL,      NULL}
+  {"exempts",	"o|o",	(Function) cmd_exempts,		NULL},
+  {"invites",	"o|o",	(Function) cmd_invites,		NULL},
+#endif /* S_IRCNET */
+  {"chaninfo",	"m|m",	(Function) cmd_chaninfo,	NULL},
+  {"chanset",	"m|m",	(Function) cmd_chanset,		NULL},
+  {"chinfo",	"m|m",	(Function) cmd_chinfo,		NULL},
+  {"cycle", 	"n|n",	(Function) cmd_cycle,		NULL},
+  {"down",	"n|n",	(Function) cmd_down,		NULL},
+  {"info",	"",	(Function) cmd_info,		NULL},
+  {"slowjoin",  "n",    (Function) cmd_slowjoin,        NULL},
+  {"slowpart",  "n|n",  (Function) cmd_slowpart,        NULL},
+  {"stick",	"o|o",	(Function) cmd_stick,		NULL},
+  {"unstick",	"o|o",	(Function) cmd_unstick,		NULL},
+  {NULL,	NULL,	NULL,				NULL}
 };
 };

+ 4 - 4
src/mod/console.mod/console.c

@@ -372,10 +372,10 @@ static cmd_t mychon[] =
   {NULL,	NULL,	NULL,			NULL}
   {NULL,	NULL,	NULL,			NULL}
 };
 };
 
 
-static dcc_cmd_t mydcc[] =
+static cmd_t mydcc[] =
 {
 {
-  {"store",	"",	console_store,		NULL,        NULL},
-  {NULL,	NULL,	NULL,			NULL,        NULL}
+  {"store",	"",	console_store,		NULL},
+  {NULL,	NULL,	NULL,			NULL}
 };
 };
 
 
 EXPORT_SCOPE char *console_start();
 EXPORT_SCOPE char *console_start();
@@ -395,7 +395,7 @@ char *console_start(Function * global_funcs)
 
 
   module_register(MODULE_NAME, console_table, 1, 1);
   module_register(MODULE_NAME, console_table, 1, 1);
   add_builtins(H_chon, mychon);
   add_builtins(H_chon, mychon);
-  add_builtins_dcc(H_dcc, mydcc);
+  add_builtins(H_dcc, mydcc);
   add_tcl_ints(myints);
   add_tcl_ints(myints);
   USERENTRY_CONSOLE.get = def_get;
   USERENTRY_CONSOLE.get = def_get;
   add_entry_type(&USERENTRY_CONSOLE);
   add_entry_type(&USERENTRY_CONSOLE);

+ 24 - 24
src/mod/irc.mod/cmdsirc.c

@@ -1575,33 +1575,33 @@ static void cmd_reset(struct userrec *u, int idx, char *par)
   }
   }
 }
 }
 
 
-static dcc_cmd_t irc_dcc[] =
+static cmd_t irc_dcc[] =
 {
 {
-  {"act",		"o|o",	 (Function) cmd_act,		NULL,         NULL},
-  {"adduser",		"m|m",	 (Function) cmd_adduser,		NULL,         NULL},
+  {"act",		"o|o",	 (Function) cmd_act,		NULL},
+  {"adduser",		"m|m",	 (Function) cmd_adduser,	NULL},
 #ifdef S_AUTH
 #ifdef S_AUTH
-  {"authed",		"n",	 (Function) cmd_authed,			NULL,         NULL},
+  {"authed",		"n",	 (Function) cmd_authed,		NULL},
 #endif /* S_AUTH */
 #endif /* S_AUTH */
-  {"channel",		"o|o",	 (Function) cmd_channel,		NULL,         NULL},
-  {"deluser",		"m|m",	 (Function) cmd_deluser,		NULL,         NULL},
-  {"deop",		"o|o",	 (Function) cmd_deop,		NULL,         NULL},
-  {"devoice",		"o|o",	 (Function) cmd_devoice,		NULL,         NULL},
-  {"getkey",            "o|o",   (Function) cmd_getkey,         NULL,         NULL},
-  {"find",		"",	 (Function) cmd_find,		NULL,	      NULL},
-  {"invite",		"o|o",	 (Function) cmd_invite,		NULL,         NULL},
-  {"kick",		"o|o", (Function) cmd_kick,		NULL,         NULL},
-  {"kickban",		"o|o", (Function) cmd_kickban,		NULL,         NULL},
-  {"mdop",              "n|n",     (Function) cmd_mdop,           NULL,         NULL},
-  {"msg",		"o",	 (Function) cmd_msg,		NULL,         NULL},
-  {"op",		"o|o",	 (Function) cmd_op,		NULL,         NULL},
-  {"reset",		"m|m",	 (Function) cmd_reset,		NULL,         NULL},
-  {"resetbans",		"o|o",	 (Function) cmd_resetbans,	NULL,         NULL},
-  {"resetexempts",	"o|o",	 (Function) cmd_resetexempts,	NULL,         NULL},
-  {"resetinvites",	"o|o",	 (Function) cmd_resetinvites,	NULL,         NULL},
-  {"say",		"o|o",	 (Function) cmd_say,		NULL,         NULL},
-  {"topic",		"o|o",	 (Function) cmd_topic,		NULL,         NULL},
-  {"voice",		"o|o",	 (Function) cmd_voice,		NULL,         NULL},
-  {NULL,		NULL,	 NULL,				NULL,         NULL, NULL}
+  {"channel",		"o|o",	 (Function) cmd_channel,	NULL},
+  {"deluser",		"m|m",	 (Function) cmd_deluser,	NULL},
+  {"deop",		"o|o",	 (Function) cmd_deop,		NULL},
+  {"devoice",		"o|o",	 (Function) cmd_devoice,	NULL},
+  {"getkey",            "o|o",   (Function) cmd_getkey,         NULL},
+  {"find",		"",	 (Function) cmd_find,		NULL},
+  {"invite",		"o|o",	 (Function) cmd_invite,		NULL},
+  {"kick",		"o|o",	 (Function) cmd_kick,		NULL},
+  {"kickban",		"o|o",	 (Function) cmd_kickban,	NULL},
+  {"mdop",              "n|n",	 (Function) cmd_mdop,		NULL},
+  {"msg",		"o",	 (Function) cmd_msg,		NULL},
+  {"op",		"o|o",	 (Function) cmd_op,		NULL},
+  {"reset",		"m|m",	 (Function) cmd_reset,		NULL},
+  {"resetbans",		"o|o",	 (Function) cmd_resetbans,	NULL},
+  {"resetexempts",	"o|o",	 (Function) cmd_resetexempts,	NULL},
+  {"resetinvites",	"o|o",	 (Function) cmd_resetinvites,	NULL},
+  {"say",		"o|o",	 (Function) cmd_say,		NULL},
+  {"topic",		"o|o",	 (Function) cmd_topic,		NULL},
+  {"voice",		"o|o",	 (Function) cmd_voice,		NULL},
+  {NULL,		NULL,	 NULL,				NULL}
 };
 };
 
 
 #endif
 #endif

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

@@ -1879,7 +1879,7 @@ char *irc_start(Function * global_funcs)
 	       traced_rfccompliant, NULL);
 	       traced_rfccompliant, NULL);
   add_tcl_ints(myints);
   add_tcl_ints(myints);
   add_builtins(H_bot, irc_bot);
   add_builtins(H_bot, irc_bot);
-  add_builtins_dcc(H_dcc, irc_dcc);
+  add_builtins(H_dcc, irc_dcc);
   add_builtins(H_msg, C_msg);
   add_builtins(H_msg, C_msg);
 #ifdef S_AUTH
 #ifdef S_AUTH
   add_builtins(H_msgc, C_msgc);
   add_builtins(H_msgc, C_msgc);

+ 2 - 2
src/mod/module.h

@@ -499,8 +499,8 @@
 #define kickreason ((char *(*)(int))global[300])
 #define kickreason ((char *(*)(int))global[300])
 /* 301 - 304 */
 /* 301 - 304 */
 #define getting_users ((int (*)())global[301])
 #define getting_users ((int (*)())global[301])
-#define add_builtins_dcc ((int (*) (tcl_bind_list_t *, dcc_cmd_t *))global[302])
-#define rem_builtins_dcc ((int (*) (tcl_bind_list_t *, dcc_cmd_t *))global[303])
+/* 302 */
+/* 303 */
 #define USERENTRY_ADDED (*(struct user_entry_type *)(global[304]))
 #define USERENTRY_ADDED (*(struct user_entry_type *)(global[304]))
 /* 305 - 308 */
 /* 305 - 308 */
 #define bdhash ((char *)(global[305]))
 #define bdhash ((char *)(global[305]))

+ 8 - 8
src/mod/notes.mod/cmdsnote.c

@@ -216,13 +216,13 @@ static void cmd_note(struct userrec *u, int idx, char *par)
   add_note(p, dcc[idx].nick, par, idx, echo);
   add_note(p, dcc[idx].nick, par, idx, echo);
 }
 }
 
 
-static dcc_cmd_t notes_cmds[] =
+static cmd_t notes_cmds[] =
 {
 {
-  {"fwd",	"m",	(Function) cmd_fwd,		NULL,          NULL},
-  {"notes",	"",	(Function) cmd_notes,		NULL,          NULL},
-  {"+noteign",	"",	(Function) cmd_pls_noteign,	NULL,          NULL},
-  {"-noteign",	"",	(Function) cmd_mns_noteign,	NULL,          NULL},
-  {"noteigns",	"",	(Function) cmd_noteigns,	NULL,          NULL},
-  {"note",	"",	(Function) cmd_note,		NULL,          NULL},
-  {NULL,	NULL,	NULL,				NULL,          NULL}
+  {"fwd",	"m",	(Function) cmd_fwd,		NULL},
+  {"notes",	"",	(Function) cmd_notes,		NULL},
+  {"+noteign",	"",	(Function) cmd_pls_noteign,	NULL},
+  {"-noteign",	"",	(Function) cmd_mns_noteign,	NULL},
+  {"noteigns",	"",	(Function) cmd_noteigns,	NULL},
+  {"note",	"",	(Function) cmd_note,		NULL},
+  {NULL,	NULL,	NULL,				NULL}
 };
 };

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

@@ -906,7 +906,7 @@ char *notes_start(Function * global_funcs)
   add_hook(HOOK_MATCH_NOTEREJ, (Function) match_note_ignore);
   add_hook(HOOK_MATCH_NOTEREJ, (Function) match_note_ignore);
   add_tcl_ints(notes_ints);
   add_tcl_ints(notes_ints);
   add_tcl_strings(notes_strings);
   add_tcl_strings(notes_strings);
-  add_builtins_dcc(H_dcc, notes_cmds);
+  add_builtins(H_dcc, notes_cmds);
   add_builtins(H_chon, notes_chon);
   add_builtins(H_chon, notes_chon);
   add_builtins(H_away, notes_away);
   add_builtins(H_away, notes_away);
   add_builtins(H_nkch, notes_nkch);
   add_builtins(H_nkch, notes_nkch);

+ 7 - 7
src/mod/server.mod/cmdsserv.c

@@ -117,13 +117,13 @@ static void cmd_clearqueue(struct userrec *u, int idx, char *par)
  *
  *
  * As with msg commands, function is responsible for any logging.
  * As with msg commands, function is responsible for any logging.
  */
  */
-static dcc_cmd_t C_dcc_serv[] =
+static cmd_t C_dcc_serv[] =
 {
 {
-  {"clearqueue",	"m",	(Function) cmd_clearqueue,	NULL,          NULL},
-  {"dump",		"a",	(Function) cmd_dump,		NULL,          NULL},
-  {"jump",		"m",	(Function) cmd_jump,		NULL,          NULL},
-  {"servers",		"m",	(Function) cmd_servers,		NULL,          NULL},
-  {NULL,		NULL,	NULL,				NULL,          NULL, NULL}
+  {"clearqueue",	"m",	(Function) cmd_clearqueue,	NULL},
+  {"dump",		"a",	(Function) cmd_dump,		NULL},
+  {"jump",		"m",	(Function) cmd_jump,		NULL},
+  {"servers",		"m",	(Function) cmd_servers,		NULL},
+  {NULL,		NULL,	NULL,				NULL}
 };
 };
 
 
-#endif
+#endif /* LEAF */

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

@@ -2072,7 +2072,7 @@ char *server_start(Function *global_funcs)
   H_ctcr = add_bind_table("ctcr", HT_STACKABLE, server_6char);
   H_ctcr = add_bind_table("ctcr", HT_STACKABLE, server_6char);
   H_ctcp = add_bind_table("ctcp", HT_STACKABLE, server_6char);
   H_ctcp = add_bind_table("ctcp", HT_STACKABLE, server_6char);
   add_builtins(H_raw, my_raw_binds);
   add_builtins(H_raw, my_raw_binds);
-  add_builtins_dcc(H_dcc, C_dcc_serv);
+  add_builtins(H_dcc, C_dcc_serv);
   add_builtins(H_ctcp, my_ctcps);
   add_builtins(H_ctcp, my_ctcps);
   my_tcl_strings[0].buf = botname;
   my_tcl_strings[0].buf = botname;
   add_tcl_strings(my_tcl_strings);
   add_tcl_strings(my_tcl_strings);

+ 2 - 2
src/modules.c

@@ -558,8 +558,8 @@ Function global_table[] =
   (Function) enetpass,  	/* char *				*/
   (Function) enetpass,  	/* char *				*/
   (Function) kickreason,
   (Function) kickreason,
   (Function) getting_users,
   (Function) getting_users,
-  (Function) add_builtins_dcc,
-  (Function) rem_builtins_dcc,
+  (Function) 0,
+  (Function) 0,
   (Function) & USERENTRY_ADDED,	/* struct user_entry_type *	*/
   (Function) & USERENTRY_ADDED,	/* struct user_entry_type *	*/
   (Function) bdhash,
   (Function) bdhash,
   (Function) isupdatehub,
   (Function) isupdatehub,

+ 3 - 50
src/tclhash.c

@@ -186,7 +186,7 @@ int expmem_tclhash(void)
 }
 }
 
 
 
 
-extern dcc_cmd_t C_dcc[];
+extern cmd_t C_dcc[];
 static int tcl_bind();
 static int tcl_bind();
 
 
 static cd_tcl_cmd cd_cmd_table[] = {
 static cd_tcl_cmd cd_cmd_table[] = {
@@ -219,7 +219,7 @@ void init_bind(void)
   H_away = add_bind_table("away", HT_STACKABLE, builtin_chat);
   H_away = add_bind_table("away", HT_STACKABLE, builtin_chat);
   H_act = add_bind_table("act", HT_STACKABLE, builtin_chat);
   H_act = add_bind_table("act", HT_STACKABLE, builtin_chat);
   H_event = add_bind_table("evnt", HT_STACKABLE, builtin_char);
   H_event = add_bind_table("evnt", HT_STACKABLE, builtin_char);
-  add_builtins_dcc(H_dcc, C_dcc);
+  add_builtins(H_dcc, C_dcc);
   Context;
   Context;
 }
 }
 
 
@@ -227,7 +227,7 @@ void kill_bind(void)
 {
 {
   tcl_bind_list_t	*tl, *tl_next;
   tcl_bind_list_t	*tl, *tl_next;
 
 
-  rem_builtins_dcc(H_dcc, C_dcc);
+  rem_builtins(H_dcc, C_dcc);
   for (tl = bind_table_list; tl; tl = tl_next) {
   for (tl = bind_table_list; tl; tl = tl_next) {
     tl_next = tl->next;
     tl_next = tl->next;
 
 
@@ -1177,53 +1177,6 @@ void add_builtins(tcl_bind_list_t *tl, cmd_t *cc)
   }
   }
 }
 }
 
 
-void add_builtins_dcc(tcl_bind_list_t *tl, dcc_cmd_t * cc)
-{
-  int	k, i;
-  char	p[1024], *l;
-  cd_tcl_cmd table[2];
-  table[0].name = p;
-  table[0].callback = tl->func;
-  table[1].name = NULL;
-  for (i = 0; cc[i].name; i++) {
-  //lets add to the help system..
-    cmds[cmdi].name = cc[i].name;
-    cmds[cmdi].usage = cc[i].usage;
-    cmds[cmdi].desc = cc[i].desc;
-    cmds[cmdi].flags.match = FR_GLOBAL | FR_CHAN;
-    break_down_flags(cc[i].flags, &(cmds[cmdi].flags), NULL);
-    cmdi++;
-
-    egg_snprintf(p, sizeof p, "*%s:%s", tl->name,
-		   cc[i].funcname ? cc[i].funcname : cc[i].name);
-    l = (char *) nmalloc(Tcl_ScanElement(p, &k));
-    Tcl_ConvertElement(p, l, k | TCL_DONT_USE_BRACES);
-    table[0].cdata = (void *)cc[i].func;
-    add_cd_tcl_cmds(table);
-    bind_bind_entry(tl, cc[i].flags, cc[i].name, l);
-    nfree(l);
-  }
-
-/*
-  int i;
-
-  for (i = 0; cc[i].name; i++) {
-    bind_bind_entry(table, cc[i].flags, cc[i].name, "");
-  }
-*/
-}
-
-void rem_builtins_dcc(tcl_bind_list_t *table, dcc_cmd_t *cc)
-{
-  int i;
-
-  for (i = 0; cc[i].name; i++) {
-    unbind_bind_entry(table, cc[i].flags, cc[i].name, "");
-  }
-
-}
-
-
 /* Remove the default msg/dcc/fil commands from the Tcl interpreter */
 /* Remove the default msg/dcc/fil commands from the Tcl interpreter */
 void rem_builtins(tcl_bind_list_t *table, cmd_t *cc)
 void rem_builtins(tcl_bind_list_t *table, cmd_t *cc)
 {
 {

+ 0 - 3
src/tclhash.h

@@ -113,9 +113,6 @@ void check_tcl_loadunld(const char *, tcl_bind_list_t *);
 void rem_builtins(tcl_bind_list_t *, cmd_t *);
 void rem_builtins(tcl_bind_list_t *, cmd_t *);
 void add_builtins(tcl_bind_list_t *, cmd_t *);
 void add_builtins(tcl_bind_list_t *, cmd_t *);
 
 
-void rem_builtins_dcc(tcl_bind_list_t *, dcc_cmd_t *);
-void add_builtins_dcc(tcl_bind_list_t *, dcc_cmd_t *);
-
 int check_validity(char *, Function);
 int check_validity(char *, Function);
 extern p_tcl_bind_list H_chat, H_act, H_bcst, H_chon, H_chof;
 extern p_tcl_bind_list H_chat, H_act, H_bcst, H_chon, H_chof;
 extern p_tcl_bind_list H_load, H_unld, H_dcc, H_bot, H_link;
 extern p_tcl_bind_list H_load, H_unld, H_dcc, H_bot, H_link;