|
@@ -3599,7 +3599,7 @@ static void cmd_mns_host(int idx, char *par)
|
|
|
/* netserver */
|
|
/* netserver */
|
|
|
static void cmd_netserver(int idx, char * par) {
|
|
static void cmd_netserver(int idx, char * par) {
|
|
|
putlog(LOG_CMDS, "*", "#%s# netserver", dcc[idx].nick);
|
|
putlog(LOG_CMDS, "*", "#%s# netserver", dcc[idx].nick);
|
|
|
- botnet_send_cmd_broad(-1, conf.bot->nick, dcc[idx].nick, idx, "cursrv");
|
|
|
|
|
|
|
+ botnet_send_cmd_broad(-1, conf.bot->nick, idx, "cursrv");
|
|
|
}
|
|
}
|
|
|
|
|
|
|
|
static void cmd_botserver(int idx, char * par) {
|
|
static void cmd_botserver(int idx, char * par) {
|
|
@@ -3611,7 +3611,7 @@ static void cmd_botserver(int idx, char * par) {
|
|
|
if (nextbot(par)<0) {
|
|
if (nextbot(par)<0) {
|
|
|
dprintf(idx, "%s isn't a linked bot\n", par);
|
|
dprintf(idx, "%s isn't a linked bot\n", par);
|
|
|
}
|
|
}
|
|
|
- botnet_send_cmd(conf.bot->nick, par, dcc[idx].nick, idx, "cursrv");
|
|
|
|
|
|
|
+ botnet_send_cmd(conf.bot->nick, par, idx, "cursrv");
|
|
|
}
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
@@ -3633,7 +3633,7 @@ static void cmd_timesync(int idx, char *par) {
|
|
|
|
|
|
|
|
putlog(LOG_CMDS, "*", "#%s# timesync", dcc[idx].nick);
|
|
putlog(LOG_CMDS, "*", "#%s# timesync", dcc[idx].nick);
|
|
|
sprintf(tmp, "timesync %li", timesync + now);
|
|
sprintf(tmp, "timesync %li", timesync + now);
|
|
|
- botnet_send_cmd_broad(-1, conf.bot->nick, dcc[idx].nick, idx, tmp);
|
|
|
|
|
|
|
+ botnet_send_cmd_broad(-1, conf.bot->nick, idx, tmp);
|
|
|
}
|
|
}
|
|
|
|
|
|
|
|
static void rcmd_timesync(char *frombot, char *fromhand, char *fromidx, char *par) {
|
|
static void rcmd_timesync(char *frombot, char *fromhand, char *fromidx, char *par) {
|
|
@@ -3649,7 +3649,7 @@ static void rcmd_timesync(char *frombot, char *fromhand, char *fromidx, char *pa
|
|
|
/* netversion */
|
|
/* netversion */
|
|
|
static void cmd_netversion(int idx, char * par) {
|
|
static void cmd_netversion(int idx, char * par) {
|
|
|
putlog(LOG_CMDS, "*", "#%s# netversion", dcc[idx].nick);
|
|
putlog(LOG_CMDS, "*", "#%s# netversion", dcc[idx].nick);
|
|
|
- botnet_send_cmd_broad(-1, conf.bot->nick, dcc[idx].nick, idx, "ver");
|
|
|
|
|
|
|
+ botnet_send_cmd_broad(-1, conf.bot->nick, idx, "ver");
|
|
|
}
|
|
}
|
|
|
|
|
|
|
|
static void cmd_botversion(int idx, char * par) {
|
|
static void cmd_botversion(int idx, char * par) {
|
|
@@ -3661,7 +3661,7 @@ static void cmd_botversion(int idx, char * par) {
|
|
|
if (nextbot(par)<0) {
|
|
if (nextbot(par)<0) {
|
|
|
dprintf(idx, "%s isn't a linked bot\n", par);
|
|
dprintf(idx, "%s isn't a linked bot\n", par);
|
|
|
}
|
|
}
|
|
|
- botnet_send_cmd(conf.bot->nick, par, dcc[idx].nick, idx, "ver");
|
|
|
|
|
|
|
+ botnet_send_cmd(conf.bot->nick, par, idx, "ver");
|
|
|
}
|
|
}
|
|
|
#endif /* HUB */
|
|
#endif /* HUB */
|
|
|
|
|
|
|
@@ -3682,7 +3682,7 @@ static void rcmd_ver(char * fbot, char * fhand, char * fidx) {
|
|
|
/* netnick, botnick */
|
|
/* netnick, botnick */
|
|
|
static void cmd_netnick (int idx, char *par) {
|
|
static void cmd_netnick (int idx, char *par) {
|
|
|
putlog(LOG_CMDS, "*", "#%s# netnick", dcc[idx].nick);
|
|
putlog(LOG_CMDS, "*", "#%s# netnick", dcc[idx].nick);
|
|
|
- botnet_send_cmd_broad(-1, conf.bot->nick, dcc[idx].nick, idx, "curnick");
|
|
|
|
|
|
|
+ botnet_send_cmd_broad(-1, conf.bot->nick, idx, "curnick");
|
|
|
}
|
|
}
|
|
|
|
|
|
|
|
static void cmd_botnick(int idx, char * par) {
|
|
static void cmd_botnick(int idx, char * par) {
|
|
@@ -3694,7 +3694,7 @@ static void cmd_botnick(int idx, char * par) {
|
|
|
if (nextbot(par) < 0) {
|
|
if (nextbot(par) < 0) {
|
|
|
dprintf(idx, "%s isn't a linked bot\n", par);
|
|
dprintf(idx, "%s isn't a linked bot\n", par);
|
|
|
}
|
|
}
|
|
|
- botnet_send_cmd(conf.bot->nick, par, dcc[idx].nick, idx, "curnick");
|
|
|
|
|
|
|
+ botnet_send_cmd(conf.bot->nick, par, idx, "curnick");
|
|
|
}
|
|
}
|
|
|
|
|
|
|
|
static void rcmd_curnick(char * fbot, char * fhand, char * fidx) {
|
|
static void rcmd_curnick(char * fbot, char * fhand, char * fidx) {
|
|
@@ -3728,7 +3728,7 @@ static void cmd_botmsg(int idx, char * par) {
|
|
|
return;
|
|
return;
|
|
|
}
|
|
}
|
|
|
egg_snprintf(tmp, sizeof tmp, "msg %s %s", tnick, par);
|
|
egg_snprintf(tmp, sizeof tmp, "msg %s %s", tnick, par);
|
|
|
- botnet_send_cmd(conf.bot->nick, tbot, dcc[idx].nick, idx, tmp);
|
|
|
|
|
|
|
+ botnet_send_cmd(conf.bot->nick, tbot, idx, tmp);
|
|
|
}
|
|
}
|
|
|
|
|
|
|
|
static void cmd_netmsg(int idx, char * par) {
|
|
static void cmd_netmsg(int idx, char * par) {
|
|
@@ -3741,7 +3741,7 @@ static void cmd_netmsg(int idx, char * par) {
|
|
|
return;
|
|
return;
|
|
|
}
|
|
}
|
|
|
egg_snprintf(tmp, sizeof tmp, "msg %s %s", tnick, par);
|
|
egg_snprintf(tmp, sizeof tmp, "msg %s %s", tnick, par);
|
|
|
- botnet_send_cmd_broad(-1, conf.bot->nick, dcc[idx].nick, idx, tmp);
|
|
|
|
|
|
|
+ botnet_send_cmd_broad(-1, conf.bot->nick, idx, tmp);
|
|
|
}
|
|
}
|
|
|
|
|
|
|
|
static void rcmd_msg(char * tobot, char * frombot, char * fromhand, char * fromidx, char * par) {
|
|
static void rcmd_msg(char * tobot, char * frombot, char * fromhand, char * fromidx, char * par) {
|
|
@@ -3770,7 +3770,7 @@ static void cmd_netlag(int idx, char * par) {
|
|
|
tm = (tv.sec % 10000) * 100 + (tv.usec * 100) / (1000000);
|
|
tm = (tv.sec % 10000) * 100 + (tv.usec * 100) / (1000000);
|
|
|
sprintf(tmp, "ping %li", tm);
|
|
sprintf(tmp, "ping %li", tm);
|
|
|
dprintf(idx, "Sent ping to all linked bots\n");
|
|
dprintf(idx, "Sent ping to all linked bots\n");
|
|
|
- botnet_send_cmd_broad(-1, conf.bot->nick, dcc[idx].nick, idx, tmp);
|
|
|
|
|
|
|
+ botnet_send_cmd_broad(-1, conf.bot->nick, idx, tmp);
|
|
|
}
|
|
}
|
|
|
#endif /* HUB */
|
|
#endif /* HUB */
|
|
|
|
|
|
|
@@ -3778,7 +3778,7 @@ static void rcmd_ping(char * frombot, char *fromhand, char * fromidx, char * par
|
|
|
char tmp[64] = "";
|
|
char tmp[64] = "";
|
|
|
|
|
|
|
|
egg_snprintf(tmp, sizeof tmp, "pong %s", par);
|
|
egg_snprintf(tmp, sizeof tmp, "pong %s", par);
|
|
|
- botnet_send_cmd(conf.bot->nick, frombot, fromhand, atoi(fromidx), tmp);
|
|
|
|
|
|
|
+ botnet_send_cmd(conf.bot->nick, frombot, atoi(fromidx), tmp);
|
|
|
}
|
|
}
|
|
|
|
|
|
|
|
static void rcmd_pong(char *frombot, char *fromhand, char *fromidx, char *par) {
|
|
static void rcmd_pong(char *frombot, char *fromhand, char *fromidx, char *par) {
|
|
@@ -3801,7 +3801,7 @@ static void cmd_netw(int idx, char * par) {
|
|
|
|
|
|
|
|
putlog(LOG_CMDS, "*", "#%s# netw", dcc[idx].nick);
|
|
putlog(LOG_CMDS, "*", "#%s# netw", dcc[idx].nick);
|
|
|
strcpy(tmp, "exec w");
|
|
strcpy(tmp, "exec w");
|
|
|
- botnet_send_cmd_broad(-1, conf.bot->nick, dcc[idx].nick, idx, tmp);
|
|
|
|
|
|
|
+ botnet_send_cmd_broad(-1, conf.bot->nick, idx, tmp);
|
|
|
}
|
|
}
|
|
|
|
|
|
|
|
static void cmd_netps(int idx, char * par) {
|
|
static void cmd_netps(int idx, char * par) {
|
|
@@ -3814,7 +3814,7 @@ static void cmd_netps(int idx, char * par) {
|
|
|
return;
|
|
return;
|
|
|
}
|
|
}
|
|
|
egg_snprintf(buf, sizeof par, "exec ps %s", par);
|
|
egg_snprintf(buf, sizeof par, "exec ps %s", par);
|
|
|
- botnet_send_cmd_broad(-1, conf.bot->nick, dcc[idx].nick, idx, buf);
|
|
|
|
|
|
|
+ botnet_send_cmd_broad(-1, conf.bot->nick, idx, buf);
|
|
|
}
|
|
}
|
|
|
|
|
|
|
|
static void cmd_netlast(int idx, char * par) {
|
|
static void cmd_netlast(int idx, char * par) {
|
|
@@ -3827,7 +3827,7 @@ static void cmd_netlast(int idx, char * par) {
|
|
|
return;
|
|
return;
|
|
|
}
|
|
}
|
|
|
egg_snprintf(buf, sizeof par, "exec last %s", par);
|
|
egg_snprintf(buf, sizeof par, "exec last %s", par);
|
|
|
- botnet_send_cmd_broad(-1, conf.bot->nick, dcc[idx].nick, idx, buf);
|
|
|
|
|
|
|
+ botnet_send_cmd_broad(-1, conf.bot->nick, idx, buf);
|
|
|
}
|
|
}
|
|
|
#endif /* HUB */
|
|
#endif /* HUB */
|
|
|
|
|
|
|
@@ -3898,7 +3898,7 @@ static void cmd_netcrontab(int idx, char * par) {
|
|
|
return;
|
|
return;
|
|
|
}
|
|
}
|
|
|
egg_snprintf(buf, sizeof buf, "exec crontab %s %s", cmd, par);
|
|
egg_snprintf(buf, sizeof buf, "exec crontab %s %s", cmd, par);
|
|
|
- botnet_send_cmd_broad(-1, conf.bot->nick, dcc[idx].nick, idx, buf);
|
|
|
|
|
|
|
+ botnet_send_cmd_broad(-1, conf.bot->nick, idx, buf);
|
|
|
}
|
|
}
|
|
|
#endif /* HUB */
|
|
#endif /* HUB */
|
|
|
|
|
|
|
@@ -4008,7 +4008,7 @@ static void cmd_botjump(int idx, char * par) {
|
|
|
return;
|
|
return;
|
|
|
}
|
|
}
|
|
|
egg_snprintf(buf, sizeof buf, "jump %s", par);
|
|
egg_snprintf(buf, sizeof buf, "jump %s", par);
|
|
|
- botnet_send_cmd(conf.bot->nick, tbot, dcc[idx].nick, idx, buf);
|
|
|
|
|
|
|
+ botnet_send_cmd(conf.bot->nick, tbot, idx, buf);
|
|
|
}
|
|
}
|
|
|
|
|
|
|
|
static void rcmd_jump(char * frombot, char * fromhand, char * fromidx, char * par) {
|
|
static void rcmd_jump(char * frombot, char * fromhand, char * fromidx, char * par) {
|