I think Brian has this right, while you can interpret the Mach-II
framework as however you wish, I believe by design it's setup thusly:
Plugins
provide some logic that run on every request and have the ability to
change the flow of the event if required - best used for checks that
are needed on every page-load, such as checking login status
Filters
provide logic on a per-event basis and have access to both the event
and eventContext - best used to check request requirements on this per-
event basis and redirect the event elsewhere if required
Listeners
bridge between your View and your Model - allows the passing of event
arguments to the Service layer (if used) and obtaining any information
from the back-end that you'll want to use in a View
By the sound of things, what you're looking for is probably a Filter.
It's my opinion that Listeners should really be used sparingly and not
contain any logic in them; they should act as more of a flow through
of data.
Adrian.