@redirchat:<channel>=add makes everything the user types in local chat go out on channel instead of channel 0, typically so that a gag script can listen to it, rewrite it and re-say it. With several redirections active (from one or more objects), each message is sent once to every redirect channel. Emotes are not redirected; @rediremote handles those.

Syntax

@redirchat:<channel>=<add|rem>

Parameters

channel
Target channel, parsed with atoi. Only channels from 1 to 2147483646 are used. Other values are silently skipped, but the redirection is still active, so the message is swallowed.

Specification

Caveats

Examples

integer GAG = -18001;
default
{
    state_entry()
    {
        llListen(GAG, "", llGetOwner(), "");
        llOwnerSay("@redirchat:" + (string)GAG + "=add");
    }
    listen(integer c, string n, key id, string msg)
    {
        // re-say a garbled version under the wearer's name
        string name = llGetDisplayName(llGetOwner());
        llSetObjectName(name);
        llSay(0, "mmph mmmph mmph...");
        llSetObjectName("Gag");
    }
}

Notes

Spec notes: the spec mentions an old bug where @redirchat also truncated emotes on channel 0. In the current code, emotes that aren't redirected go through crunchEmote with no length limit, so they are not truncated, but emotes containing quote-like characters still become ....

See also

Implementation notes

Client differences

Comparison with RLVa

This command works differently from RLVa's @redirchat; see the comparison.