Bryan Drewery %!s(int64=16) %!d(string=hai) anos
pai
achega
53fff78db7
Modificáronse 2 ficheiros con 2 adicións e 2 borrados
  1. 1 0
      src/binds.c
  2. 1 2
      src/cmds.c

+ 1 - 0
src/binds.c

@@ -427,6 +427,7 @@ void add_builtins(const char *table_name, cmd_t *cmds)
 
 	for (; cmds->name; cmds++) {
           if (have_cmd(cmds->name, cmds->type)) {
+                if (!strncasecmp(cmds->name, "netm", 4) && !HAVE_F2) continue;
                 /* add BT_dcc cmds to cmdlist[] :: add to the help system.. */
                 if (!strcmp(table->name, "dcc") && (findhelp(cmds->name) != NULL)) {
                   cmdlist[cmdi].name = cmds->name;

+ 1 - 2
src/cmds.c

@@ -3884,7 +3884,6 @@ static void cmd_botmsg(int idx, char * par) {
   botnet_send_cmd(conf.bot->nick, tbot, dcc[idx].nick, idx, tmp);
 }
 
-#if 0
 static void cmd_netmsg(int idx, char * par) {
   char *tnick = NULL;
 
@@ -3900,7 +3899,6 @@ static void cmd_netmsg(int idx, char * par) {
   simple_snprintf(tmp, sizeof tmp, "msg %s %s", tnick, par);
   botnet_send_cmd_broad(-1, conf.bot->nick, dcc[idx].nick, idx, tmp);
 }
-#endif
 
 static void rcmd_msg(char * tobot, char * frombot, char * fromhand, char * fromidx, char * par) {
   if (!conf.bot->hub) {
@@ -4545,6 +4543,7 @@ cmd_t C_dcc[] =
   {"whom",		"",	(Function) cmd_whom,		NULL, 0},
   {"whoami",		"",	(Function) cmd_whoami,		NULL, AUTH},
   {"botjump",           "m",    (Function) cmd_botjump,         NULL, HUB},
+  {"netmsg",		"a",    (Function) cmd_netmsg,          NULL, HUB},
   {"botmsg",		"o",    (Function) cmd_botmsg,          NULL, HUB},
   {"botnick", 		"m", 	(Function) cmd_botnick, 	NULL, HUB},
   {"netnick", 		"m", 	(Function) cmd_netnick, 	NULL, HUB},