LlAddToLandBanList/ja

From Second Life Wiki
< LlAddToLandBanList
Revision as of 10:58, 21 February 2016 by SakuraNoel Fayray (Talk | contribs)

(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to: navigation, search

Summary

Function: llAddToLandBanList( key avatar, float hours );

avatarhours 時間の間、あるいは hours がゼロの場合は永遠に、その土地の "禁止された住人" 一覧へ追加します。

• key avatar アバターの UUID
• float hours

Caveats

  • This function causes the script to sleep for 0.1 seconds.

Important Issues

~ All Issues ~ Search JIRA for related Bugs
   llAddToLandBanList, either permanently or no more than 8640 minutes (aka: 144 hours/6 days)

Examples

// これは不完全なやりかたです。BAN 取り消しの時ですら、
// アバター名を完全に指定する必要がありますので。
// あくまで、土地の許可/禁止を管理する関数の使用例です。
// コピー、使用、改変、配布はご自由に、自己責任でどうぞ。
// 
// Commands are:
//   /5 ban:full_avatar_name
//   /5 tempban:full_avatar_name
//   /5 unban:full_avatar_name
//   /5 pass:full_avatar_name
//   /5 unpass:full_avatar_name
//   /5 clearban
//   /5 clearpass
 
string command;
 
default
{
    state_entry()
    {
        llListen(5, "", llGetOwner(), "");
    }
 
    on_rez(integer param)
    {
        llResetScript();
    }
 
    listen(integer chan, string name, key id, string message)
    {
        if (command != "")
        {
            llOwnerSay("前のコマンドを処理中です。時間をおいて再実行してください。");
        }
 
        list args = llParseString2List(message,[":"],[]);
        command = llToLower(llList2String(args,0));
 
        if (command == "clearbans")
        {
            llResetLandBanList();
        }
        if (command == "clearpass")
        {
            llResetLandPassList();
        }
        else
        {
            llSensor(llList2String(args,1),NULL_KEY,AGENT,96,PI);
        }
    }
 
    no_sensor()
    {
        command = "";
    }
 
    sensor(integer num)
    {
        integer i = 0;
        for (; i < num; ++i)
        {
            if (command == "ban")
            {
                // Ban indefinetely 
                llAddToLandBanList(llDetectedKey(i),0.0);
            }
            if (command == "tempban")
            {
                // Ban for 1 hour.
                llAddToLandBanList(llDetectedKey(i),1.0);
            }
            if (command == "unban")
            {
                llRemoveFromLandBanList(llDetectedKey(i));
            }
            if (command == "pass")
            {
                // Add to land pass list for 1 hour
                llAddToLandPassList(llDetectedKey(i),1.0);
            }
            if (command == "unpass")
            {
                llRemoveFromLandPassList(llDetectedKey(i));
            }
        }
        command = "";
    }
}

Deep Notes

All Issues

~ Search JIRA for related Issues
   llAddToLandBanList, either permanently or no more than 8640 minutes (aka: 144 hours/6 days)

Signature

function void llAddToLandBanList( key avatar, float hours );