|
|
@@ -3963,7 +3963,7 @@ static void rcmd_curnick(char * fbot, char * fhand, char * fidx) {
|
|
|
}
|
|
|
}
|
|
|
|
|
|
-/* netmsg, botmsg */
|
|
|
+/* botmsg */
|
|
|
static void cmd_botmsg(int idx, char * par) {
|
|
|
char *tnick = NULL, *tbot = NULL;
|
|
|
|
|
|
@@ -3986,29 +3986,6 @@ static void cmd_botmsg(int idx, char * par) {
|
|
|
botnet_send_cmd(conf.bot->nick, tbot, dcc[idx].nick, idx, tmp);
|
|
|
}
|
|
|
|
|
|
-static void cmd_netmsg(int idx, char * par) {
|
|
|
- char *tnick = NULL;
|
|
|
-
|
|
|
- putlog(LOG_CMDS, "*", "#%s# netmsg %s", dcc[idx].nick, par);
|
|
|
- tnick = newsplit(&par);
|
|
|
- if (!par[0]) {
|
|
|
- dprintf(idx, "Usage: netmsg <#channel> <message>\n");
|
|
|
- return;
|
|
|
- }
|
|
|
-
|
|
|
- if (!strchr(CHANMETA, tnick[0])) {
|
|
|
- dprintf(idx, "You may only netmsg channels the bots are opped in.\n");
|
|
|
- return;
|
|
|
- }
|
|
|
-
|
|
|
- dprintf(idx, "Abuse of this command may lead to G/D/Klines, shell slips and rage.\n");
|
|
|
-
|
|
|
- char tmp[1024] = "";
|
|
|
-
|
|
|
- simple_snprintf(tmp, sizeof tmp, "nmsg %s %s", tnick, par);
|
|
|
- botnet_send_cmd_broad(-1, conf.bot->nick, dcc[idx].nick, idx, tmp);
|
|
|
-}
|
|
|
-
|
|
|
static void rcmd_msg(char * tobot, char * frombot, char * fromhand, char * fromidx, char * par) {
|
|
|
if (!conf.bot->hub) {
|
|
|
char *nick = newsplit(&par);
|
|
|
@@ -4023,18 +4000,6 @@ static void rcmd_msg(char * tobot, char * frombot, char * fromhand, char * fromi
|
|
|
}
|
|
|
}
|
|
|
|
|
|
-static void rcmd_nmsg(char * tobot, char * frombot, char * fromhand, char * fromidx, char * par) {
|
|
|
- if (!conf.bot->hub) {
|
|
|
- char *par2 = strdup(par), *p2 = par2;
|
|
|
- char *nick = newsplit(&par2);
|
|
|
-
|
|
|
- if (!(!strchr(CHANMETA, nick[0]) || !me_op(findchan_by_dname(nick))))
|
|
|
- rcmd_msg(tobot, frombot, fromhand, fromidx, par);
|
|
|
- free(p2);
|
|
|
- }
|
|
|
-}
|
|
|
-
|
|
|
-
|
|
|
/* netlag */
|
|
|
static void cmd_netlag(int idx, char * par) {
|
|
|
egg_timeval_t tv;
|
|
|
@@ -4379,9 +4344,6 @@ void gotremotecmd (char *forbot, char *frombot, char *fromhand, char *fromidx, c
|
|
|
rcmd_jump(frombot, fromhand, fromidx, par);
|
|
|
} else if (!strcmp(cmd, "msg")) {
|
|
|
rcmd_msg(forbot, frombot, fromhand, fromidx, par);
|
|
|
- } else if (!strcmp(cmd, "nmsg")) {
|
|
|
- if (!strchr(CHANMETA, par[0])) return;
|
|
|
- rcmd_nmsg(forbot, frombot, fromhand, fromidx, par);
|
|
|
} else if (!strcmp(cmd, "ver")) {
|
|
|
rcmd_ver(frombot, fromhand, fromidx);
|
|
|
} else if (!strcmp(cmd, "ping")) {
|
|
|
@@ -4669,7 +4631,6 @@ 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},
|