Try the attached patch to mod_echo (v1.4.2) on for size...

You'll also need to fixup your jabber.xml

1) Create a service that will be the target of your copied messages.  In
my case I'm using an accept component

<jabber>...
        <service id="myservice.localhost">
                <accept>
                        <ip/>
                        <port>6969</port>
                        <secret>secret</secret>
                </accept>
        </service>

2) If you use my patch verbatim, add this snippet to the <jabber><jsm>
section

<jabber>...
        <jsm>...
                <presence><bcc>myservice.localhost</bcc></presence>

3) If you also want to receive presence via the normal jabber bcc
function, make sure to fixup the admin section of <jabber><jsm> to look
like such

<jabber>...
        <jsm>...
              <admin>
                        <read>myservice.localhost</read>
                </admin>


OKOKOK, so I patched mod_echo instead of writing a standalone module.
KISS told me to.  I'm holding off until JabberD2 before more coding...

You'll also find commented out code in mod_echo.c to play with.  For my
purposes I only needed to capture a few wee packets, but in your case
you may find the additional code useful.

Hope this helps,

Mike






-----Original Message-----
From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]] On Behalf Of
Dov Katz
Sent: Wednesday, January 08, 2003 12:02 PM
To: [EMAIL PROTECTED]
Subject: [JDEV] Question regarding jabberd


If I wanted to take jabberd and add a tag which cc's all presence and
messages to a server component, please let me know if what I'm planning
on doing makes sense: 
(this is all for 1.4.2) 
I want to make a <src>/jabberd/base/base_carboncopy.c
... 


Attachment: mod_echo.c
Description: Binary data

Reply via email to