Hey Martin,
thanks for the logconf checkin.  You're right, I could just break my plugin
into two parts, or perhaps even edit the hook chain directly from my plugin.
 I just thought the logic would be cleaner if I had this method on VHost.

The plugin that needs this is actually Offline Storage.  My delivery chain
looks like:
Local Delivery -> Cluster Delivery -> Offline Storage

But my OnPresence chain looks like:
Offline Storage -> Local Delivery -> Cluster Delivery

This is because I'm using Djabberd as a message processing Queue.  If there
are offline message in the Queue for a particular JID, I'd like them all to
be processed before any live messages are delivered.

and now that I started to explain that... perhaps you have some ideas about
another 'core' change that I've been struggling with.

I'd like to modify DJabberd::Connection::ClientIn to create the field
'multi_message_delivery'.  My message Q works by delivering only 1 message
and then marking a connection as offline until I get another presence
message from that client.  Each plugin checks or sets the value of
'multi_message_delivery' based on the contents of a presence message to
determine whether to act as a one message a time Queue or to deliver all
messages.

Can anybody imagine a way to add a field to DJabberd::Connection::ClientIn
from within some sort of plugin?

Jacob

On Feb 3, 2008 7:18 AM, Martin Atkins <[EMAIL PROTECTED]> wrote:

> Jacob Burkhart wrote:
> > Hi,
> >
> > I have a need in my plugin for an additional method on VHost.pm called
> > register_hook_before
> >
> > This is because I want my offline storage plugin to be registered last
> > in the chain for message delivery, but First in the chain for
> > OnInitialPresence
> >
>
> While I understand why you'd want to do this, I'm concerned that it will
> make the plugin mechanism more confusing for users if plugins are able
> to "jump the queue" and insert themselves at the start of the list.
>
> Right now the rule is that plugins defined earlier in the configuration
> file run first. This is quite easy to understand.
>
> Can you just break your plugin into two pieces and have one at the start
> and one at the end? What does your plugin do?
>
> Cheers,
> Martin
>
>

Reply via email to