The spamx plugin interface has been modified so that other modules and
plugins can use the spamx engine to examine user submitted text.

The code from comment.php can be used as an example of the call.

// Let plugins have a chance to check for SPAM
$result = PLG_checkforSpam ($comment, $_CONF['spamx']);
    
// Now check the result and redirect to index.php if spam action was taken
if ($result > 0) {
    // notice no return value here to prevent spam based denial of service attack
    echo COM_refresh ($_CONF['site_url'] . '/index.php?msg='
                      . $result . '&amp;plugin=spamx');
    exit;
}

All that is required is to send the comment to spamx with the
PLG_checkforSpam call.  The two parameters are the comment text itself and
an action number with tells spamx what actions to take if spam is found. 
You can use the built in actions by passing the sum of the numbers of the
spamx action modules for those actions you want to use.  The actions are
performed in numerical order.  The current action modules are:

Mail admin     -> 8
Ignore comment -> 128

So to Ignore the comment pass 128, to mail the admin pass 8, to do both pass
136.  All action module numbers are multiples of 2 and each modules number
is anded with value you pass to the plugin.  The modules are executed in
numerical order so Mail Admin would happen before Ignore Comment.  Best
practices require that you put this action number in a configuration
variable, so that the site admin can change it if necessary.  If you do not
want to use any of the spamx action modules then pass 0 as the action and
check the return from the function call. If spam is found it will return
true if not false.  If you do not pass anything as the action then the
system default will be used.

Spamx has three types of modules: admin, examine, and action.  Each module
is contained within a class file.  The name of the file the module is in is
critical.  For example: an admin module must end with .Admin.class.php.  The
first part of the file name must be the name of the class contained within
the file.  So if the class was named MassDelete then the file would be named
MassDelete.Admin.class.php.  Examine modules end in .Examine.class.php and
Action modules end in .Action.class.php. If you add a new actions to spamx,
you must assign it a number.  Pick a number not used by other action modules
and in the correct numerical sequence.

