diff options
-rw-r--r-- | agni.c | 4 | ||||
-rw-r--r-- | cmd_ping.c | 2 | ||||
-rw-r--r-- | cmd_uptime.c | 2 | ||||
-rw-r--r-- | config_cmds.h | 11 | ||||
-rw-r--r-- | version.h | 4 |
5 files changed, 13 insertions, 10 deletions
@@ -574,7 +574,7 @@ int th_event_manager(void *data) tbl_qcmd *qtbl = NULL; //create execution table - etbl = tbl_exec_list_c(10); + etbl = tbl_exec_list_c(30); if (etbl == NULL) { PERM(); @@ -611,7 +611,7 @@ int th_event_manager(void *data) tbl_exec_print_tbl(etbl, TBL_PF_EXEC_ALL); //create command table - qtbl = tbl_qcmd_c(10);//well 10 should be ok right? + qtbl = tbl_qcmd_c(30);//well 30 should be ok right? //config mq printf("Start event thread\n"); @@ -7,7 +7,7 @@ void *cmd_ping(void *data) printf("PONG\n"); - ret = alloc_new_str("PONG"); + ret = alloc_new_str("ping "); return ret; }
\ No newline at end of file diff --git a/cmd_uptime.c b/cmd_uptime.c index 285aec1..6a9c963 100644 --- a/cmd_uptime.c +++ b/cmd_uptime.c @@ -26,7 +26,7 @@ void *cmd_uptime(void *data) i2 = d2; printf("Days %d Hours %d Minutes %d\n",i1/(3600*24),i1/(3600)%24, (i1/60)%60); - snprintf(buf, buf_size,"Days %d Hours %d Minutes %d\n",i1/(3600*24),i1/(3600)%24, (i1/60)%60); + snprintf(buf, buf_size,"%dd %dh %dm\n",i1/(3600*24),i1/(3600)%24, (i1/60)%60); ret = alloc_new_str(buf); diff --git a/config_cmds.h b/config_cmds.h index 8488cc0..2fc20a5 100644 --- a/config_cmds.h +++ b/config_cmds.h @@ -18,15 +18,18 @@ typedef struct single_cmd_def #include "cmd_cmd.h" #include "cmd_sha1.h" + +//some commands have aliases for compat with some developerslv bots +//nothing else comaptible will be added, as its not about "standarts" single_cmd_def confgi_cmd_list[] = { {"DATE",cmd_date}, - {"UPTIME",cmd_uptime}, - {"VERSION",cmd_version}, - {"PING",cmd_ping}, + {"UPTIME",cmd_uptime}, {"!uptime",cmd_uptime}, + {"VERSION",cmd_version}, {"!version",cmd_version}, + {"PING",cmd_ping}, {"!ping",cmd_ping}, {"LOADAVG",cmd_loadavg}, {"RUSE",cmd_rusage}, - {"CMD",cmd_cmd}, + {"CMD",cmd_cmd}, {"!echo",cmd_cmd}, {"SHA1",cmd_sha1}, {NULL,NULL} }; @@ -1,5 +1,5 @@ #ifndef __VERSION_H #define __VERSION_H -#define VERSION_DATE "Sun May 7 16:28:02 BST 2017" -#define VERSION_COMMIT "417edbc Added new commands CMD,SHA1. Added support of params for commands. Fixed some bugs with uninitialised buffers" +#define VERSION_DATE "Sun May 7 18:06:02 BST 2017" +#define VERSION_COMMIT "910c194 Forgot add Makefile changes" #endif |