User:Decimus Schomer/Scripts/Channel spier
From The Schommunity Wiki
Decimus' user page | Decimus' talk page | Decimus' scripts | Decimus' script libraries | Decimus' projects
Main scripts page | Toggling Rotate script | UUID-getter scripts | Texture changer | Channel spier | Chatbot | Jump slab | Emailer | Fractal viewer | Grammar analyser | SPD viewer
This script spies on specific channels and reports what is said to you and only you (which ones it spies on are determined by the 'channels' list)
// This code is public domain.
// You may do whatever you like with it, as long as you remember:
// ABSOLUTELY NO WARRANTY IS PROVIDED, NOT EVEN THE IMPLICIT WARRANTY THAT THE PRODUCT IS SUITABLE FOR ITS INTENDED USE.
// -Decimus Schomer
list channels = [1];
default
{
state_entry()
{
integer i;
for (i = 0; i < llGetListLength(channels); i++)
llListen(llList2Integer(channels, i), "", "", "");
}
listen(integer channel, string name, key id, string msg)
{
llInstantMessage(llGetOwner(), name + " (" + (string)channel + "): " + msg);
}
}