[JDEV] jsm mod_example entry point question

Alexander N. Spitzer aspitzer at 3plex.com
Thu Aug 2 08:57:54 CDT 2001


I am looking at creating a jsm module to transcribe all chats...

copied "mod_example.c" created "mod_transcript.c"... cut most of it out...
------------------------------------------------------------
#include "jsm.h"
mreturn mod_transcript_server(mapi m, void *arg)
{
    printf("----> TEST: in mod_transcript_server\n");
    return M_HANDLED;
}

void mod_transcript(jsmi si)
{
  printf("----> TEST: in mod_transcript\n");
  js_mapi_register(si,e_SERVER,mod_transcript_server,NULL);
}
------------------------------------------------------------

modified jabber.xml. added the following to <load main="jsm"> section:
<mod_transcript>./jsm/jsm.so</mod_transcript>


"./jabberd/jabberd" outputs:
----> TEST: in mod_transcript

okay so far...

QUESTION:
How do I get it so that mod_transcript is instantiated upon all message
arrivals... I thought (and CLEARLY I AM WRONG) that all messages pass
through all the jsm modules, and each module decides whether or not to act
on it... This does not appear to be the case, because I never see
"----> TEST: in mod_transcript_server" in any transactions...

What do I have to do to register mod_transcript with all traffic (or at
least "chat" traffic?)

tia!


					-alex

-----------------------------------------------------------------
Alexander N. Spitzer			Email: aspitzer at 3plex.com
Unix Systems Engineer			Phone: 617.349.9361
http://www.3plex.com			eFax : 509.752.4680




More information about the JDev mailing list