summaryrefslogtreecommitdiffstats
path: root/hook.c
diff options
context:
space:
mode:
authorThomas Roessler <roessler@does-not-exist.org>2000-06-21 06:17:00 +0000
committerThomas Roessler <roessler@does-not-exist.org>2000-06-21 06:17:00 +0000
commit22d028d77421375981a29486287b8454f8a652e7 (patch)
tree7c7e36491bf4cec7fb205e42581cb3c2dd047f78 /hook.c
parent77613b1469736343660e0f70955c5a54a62bd777 (diff)
Apply message-hook to more commands, and make it more useful by
permitting the "~h" and "~b" pattern specifiers. Bad enough, this removes message-hook abilities from the receive-attachment menu.
Diffstat (limited to 'hook.c')
-rw-r--r--hook.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/hook.c b/hook.c
index 5972fcf1..d6e45429 100644
--- a/hook.c
+++ b/hook.c
@@ -147,7 +147,7 @@ int mutt_parse_hook (BUFFER *buf, BUFFER *s, unsigned long data, BUFFER *err)
if (data & (M_SENDHOOK | M_SAVEHOOK | M_FCCHOOK | M_MESSAGEHOOK))
{
if ((pat = mutt_pattern_comp (pattern.data,
- (data & (M_SENDHOOK | M_FCCHOOK | M_MESSAGEHOOK)) ? 0 : M_FULL_MSG,
+ (data & (M_SENDHOOK | M_FCCHOOK)) ? 0 : M_FULL_MSG,
err)) == NULL)
goto error;
}
@@ -294,7 +294,7 @@ char *mutt_find_hook (int type, const char *pat)
return (NULL);
}
-void mutt_message_hook (HEADER *hdr, int type)
+void mutt_message_hook (CONTEXT *ctx, HEADER *hdr, int type)
{
BUFFER err, token;
HOOK *hook;
@@ -309,7 +309,7 @@ void mutt_message_hook (HEADER *hdr, int type)
continue;
if (hook->type & type)
- if ((mutt_pattern_exec (hook->pattern, 0, NULL, hdr) > 0) ^ hook->rx.not)
+ if ((mutt_pattern_exec (hook->pattern, 0, ctx, hdr) > 0) ^ hook->rx.not)
if (mutt_parse_rc_line (hook->command, &token, &err) != 0)
{
FREE (&token.data);