Hal Canary (hwc) wrote in sl_creators,
Hal Canary
hwc
sl_creators

Chat Anonymizer


// Chat Anonymizer
// Simple script to anonymize anything said to it on a
// private channel.
// Copyright 2011 Hal Canary

// To use, drop this script into a prim.  Rez that prim
// on the ground or as an attachment.

// Licence Information:
//  Permission is hereby granted, free of charge, to any
//  person obtaining a copy of this software and
//  associated documentation files (the "Software"), to
//  deal in the Software without restriction, including
//  without limitation the rights to use, copy, modify,
//  merge, publish, distribute, sublicense, and/or sell
//  copies of the Software, and to permit persons to whom
//  the Software is furnished to do so, subject to the
//  following conditions:
//
//  The above copyright notice and this permission notice
//  shall be included in all copies or substantial
//  portions of the Software.
//
//  THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF
//  ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT
//  LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS
//  FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO
//  EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE
//  FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN
//  AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
//  FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE
//  USE OR OTHER DEALINGS IN THE SOFTWARE.

integer chan = 5; // CHANGE THIS
string intro = "I will anonymize anything said on channel ";
string salt = "CsLY5jQ"; //CHANGE THIS

integer listen_handle;
default {
    state_entry() {
        llSay(0, intro + (string)chan+".");
        listen_handle = llListen(chan, "", "", "");
    }
    listen(integer channel, string name, key id,
            string message) {
        string origName = llGetObjectName(); 
        llSetObjectName(llGetSubString(
            llSHA1String(salt+name),0,8));
        llSay( 0, message);
        llSetObjectName( origName );
    }
}
  • Post a new comment

    Error

    Anonymous comments are disabled in this journal

    default userpic

    Your IP address will be recorded 

  • 0 comments