PM


contains

Type: Function
Return: bool
Description: Discover if a PM contains a specific word or phrase

function onPMBefore(userobj, target, pm)
{
    // block hashlinks in pm

    if (pm.contains("arlink"))
        return false;

    return true;
}

remove

Type: Function
Return: void
Description: Remove a specific word or phrase from a PM

function onPMBefore(userobj, target, pm)
{
    pm.remove("foo");
    pm.remove("bar");
    return true;
}

replace

Type: Function
Return: void
Description: Replace a specific word or phease in a PM

function onPMBefore(userobj, target, pm)
{
    pm.replace("foo", "bar");
    return true;
}

Last edited Dec 9, 2012 at 7:54 PM by oobenoob, version 1