@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.
@redirchat:<channel>=<add|rem>
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./me or /me's are emotes: they are redirected only by @rediremote, otherwise they are still said on channel 0.redirchat:<ch> restriction, the message is sent on ch with its original type (whisper, say or shout). Channels blocked by @sendchannel or @sendchannel_except are skipped. The message is then not sent on channel 0....).RestrainedLoveShowRedirectChatTyping is on (Marine only).llDialog that would answer on channel 0 is ignored while @redirchat or @sendchat is active./me detection like typed chat.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");
}
}
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 ....
send_chat_from_viewer in llfloaterimnearbychat.cpp:1093-1171. The redirect loop iterates over mSpecialObjectBehaviours, looking for entries that begin with redirchat:.containsSubstr("redirchat:") (761).(( … )). It falls through to channel 0 (filtered by the OOC setting). Marine redirects everything that isn't an emote./me' as an emote. Marine only recognizes /me and /me's.RestrainedLoveShowRedirectChatTyping option. Animations are always suppressed.This command works differently from RLVa's @redirchat; see the comparison.