diff --git a/commando/README.md b/commando/README.md index 1f108d8..0e485c0 100644 --- a/commando/README.md +++ b/commando/README.md @@ -20,8 +20,8 @@ Each of these can be specified more than once: ## Example Usage -$ l1-cli plugin start commando.py commando_reader=0266e4598d1d3c415f572a8488830b60f7e744ed9235eb0b1ba93283b315c03518 -$ l2-cli plugin start commando.py +$ l1-cli plugin subcommand=start plugin=`pwd`/commando.py commando_reader=0266e4598d1d3c415f572a8488830b60f7e744ed9235eb0b1ba93283b315c03518 +$ l2-cli plugin start $(pwd)/commando.py $ l2-cli commando 022d223620a359a47ff7f7ac447c85c46c923da53389221a0054c11c1e3ca31d59 stop diff --git a/commando/commando.py b/commando/commando.py index 98e83a0..8fd7b38 100755 --- a/commando/commando.py +++ b/commando/commando.py @@ -48,7 +48,8 @@ def send_msg(plugin, peer_id, msgtype, idnum, contents): def send_result(plugin, peer_id, idnum, res): - # We can only send 64k in a message. + # We can only send 64k in a message, but there is 10 byte overhead + # in the message header; 65000 is safe. parts = textwrap.wrap(json.dumps(res), 65000) for p in parts[:-1]: send_msg(plugin, peer_id, COMMANDO_REPLY_CONTINUES, idnum, p)