commando, chanbackup: use custommsg hooks.

Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
This commit is contained in:
Rusty Russell
2025-11-20 12:07:14 +10:30
parent 213cbba5bf
commit aff1d6b97f
2 changed files with 17 additions and 4 deletions

View File

@@ -603,10 +603,19 @@ static struct command_result *handle_custommsg(struct command *cmd,
return command_hook_success(cmd);
}
static u64 custommsg_types[] = {
COMMANDO_MSG_CMD_CONTINUES,
COMMANDO_MSG_CMD_TERM,
COMMANDO_MSG_REPLY_CONTINUES,
COMMANDO_MSG_REPLY_TERM,
};
static const struct plugin_hook hooks[] = {
{
"custommsg",
handle_custommsg
.name = "custommsg",
.handle = handle_custommsg,
.intfilters = custommsg_types,
.num_intfilters = ARRAY_SIZE(custommsg_types),
},
};