mirror of
https://github.com/aljazceru/plugins.git
synced 2025-12-24 08:34:18 +01:00
Feedback from GH Review.
1. Fix README.md dynamic plugin example (needs keywords, abspath!) (pointed out by @carnhofdaki). 2. Define magic number we use (suggested by @FreePietje)
This commit is contained in:
@@ -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)
|
||||
|
||||
Reference in New Issue
Block a user