diff --git a/iguana/exchanges/LP_commands.c b/iguana/exchanges/LP_commands.c index 465a0852f..5bb0f614d 100644 --- a/iguana/exchanges/LP_commands.c +++ b/iguana/exchanges/LP_commands.c @@ -56,6 +56,11 @@ char *stats_JSON(void *ctx,char *myipaddr,int32_t pubsock,double profitmargin,cJ //printf("got hello from %s:%u\n",ipaddr!=0?ipaddr:"",argport); return(0); } + else if ( strcmp(method,"message") == 0 ) + { + printf("got message.(%s) from %s:%u\n",jprint(argjson,0),ipaddr!=0?ipaddr:"",argport); + return(0); + } else if ( strcmp(method,"nn_tests") == 0 ) return(clonestr("{\"result\":\"success\"}")); else if ( strcmp(method,"help") == 0 ) @@ -83,6 +88,7 @@ trust(pubkey, trust)\n\ register(pubkey,pushaddr)\n\ registerall(numnodes)\n\ lookup(pubkey)\n\ +message(pubkey,)\n\ forward(pubkey,method2,)\n\ forward(pubkey,method2=publish,)\n\ forwardhex(pubkey,hex)\n\ diff --git a/iguana/exchanges/message b/iguana/exchanges/message new file mode 100755 index 000000000..595ce00ad --- /dev/null +++ b/iguana/exchanges/message @@ -0,0 +1,2 @@ +source userpass +curl --url "http://127.0.0.1:7779" --data "{\"userpass\":\"$userpass\",\"pubkey\":\"$1\",\"method\":\"forward\",\"method2\":\"message\",\"message\":\"some sort of message\"}"