mirror of
https://github.com/meshcore-dev/meshcore-cli.git
synced 2026-04-20 22:13:48 +00:00
initial support for scope
This commit is contained in:
parent
d95b7bf90d
commit
f3f9d28d53
1 changed files with 7 additions and 1 deletions
|
|
@ -328,7 +328,7 @@ async def log_message(mc, msg):
|
|||
if msg["type"] == "PRIV" :
|
||||
ct = mc.get_contact_by_key_prefix(msg['pubkey_prefix'])
|
||||
if ct is None:
|
||||
msg["name"] = data["pubkey_prefix"]
|
||||
msg["name"] = msg["pubkey_prefix"]
|
||||
else:
|
||||
msg["name"] = ct["adv_name"]
|
||||
elif msg["type"] == "CHAN" :
|
||||
|
|
@ -2108,6 +2108,12 @@ async def next_cmd(mc, cmds, json_output=False):
|
|||
if res is None:
|
||||
print("Error setting channel")
|
||||
|
||||
case "scope":
|
||||
argnum = 1
|
||||
res = await mc.commands.set_flood_scope(cmds[1])
|
||||
if res is None or res.type == EventType.ERROR:
|
||||
print(f"Error while setting scope")
|
||||
|
||||
case "remove_channel":
|
||||
argnum = 1
|
||||
res = await set_channel(mc, cmds[1], "", bytes.fromhex(16*"00"))
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue