| 2428 | } |
| 2429 | |
| 2430 | bool plugins_anyone_cares(struct plugins *plugins, const char *method) |
| 2431 | { |
| 2432 | struct plugin_subscription_htable_iter it; |
| 2433 | |
| 2434 | if (!plugins) |
| 2435 | return false; |
| 2436 | |
| 2437 | if (plugin_subscription_htable_getfirst(plugins->subscriptions, |
| 2438 | method, &it) != NULL) |
| 2439 | return true; |
| 2440 | |
| 2441 | /* Wildcards cover everything except "log" */ |
| 2442 | if (streq(method, "log")) |
| 2443 | return false; |
| 2444 | return plugin_subscription_htable_getfirst(plugins->subscriptions, |
| 2445 | "*", &it) != NULL; |
| 2446 | } |
| 2447 | |
| 2448 | bool plugin_single_notify(struct plugin *p, |
| 2449 | const struct jsonrpc_notification *n TAKES) |