-
-void mutt_account_hook (const char *url)
-{
- hook_t *hook;
- BUFFER token;
- BUFFER err;
- char buf[STRING];
-
- err.data = buf;
- err.dsize = sizeof (buf);
- p_clear(&token, 1);
-
- for (hook = Hooks; hook; hook = hook->next) {
- if (!(hook->command && (hook->type & M_ACCOUNTHOOK)))
- continue;
-
- if ((regexec (hook->rx.rx, url, 0, NULL, 0) == 0) ^ hook->rx.neg) {
- if (mutt_parse_rc_line (hook->command, &token, &err) == -1) {
- mutt_error ("%s", err.data);
- mutt_sleep (1);
- }
- }
- }
-
- p_delete(&token.data);
-}