Difference between revisions of "LlAddToLandBanList/ja"

From Second Life Wiki
Jump to: navigation, search
Line 1: Line 1:
 
{{Issues/SVC-1911}}{{LSL_Function/avatar/ja|avatar}}
 
{{Issues/SVC-1911}}{{LSL_Function/avatar/ja|avatar}}
{{LSL_Function/ja
+
{{LSL_Function
 
|func_id=310|func_sleep=0.1|func_energy=10.0
 
|func_id=310|func_sleep=0.1|func_energy=10.0
 
|func=llAddToLandBanList|sort=AddToLandBanList
 
|func=llAddToLandBanList|sort=AddToLandBanList

Revision as of 02:49, 14 December 2015

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

<lsl>// これは不完全なやりかたです。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 = "";
   }
}</lsl>

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 );