mirror of
https://github.com/SWG-Source/dsrc.git
synced 2026-07-29 23:15:55 -04:00
40 lines
1.0 KiB
Plaintext
40 lines
1.0 KiB
Plaintext
trigger OnSpeaking (string text)
|
|
{
|
|
if (text == "access list")
|
|
{
|
|
obj_id room = getContainedBy (self);
|
|
string[] aList = permissionsGetAllowed(room);
|
|
sendSystemMessageTestingOnly (self, "You're looking in Room " + room);
|
|
int number = aList.length;
|
|
sendSystemMessageTestingOnly (self, "There are " + number + " entries.");
|
|
if (number == 0)
|
|
{
|
|
return SCRIPT_CONTINUE;
|
|
}
|
|
for (int i=0; i < number; i++)
|
|
{
|
|
string name = aList[i];
|
|
sendSystemMessageTestingOnly (self, i + ". " + name);
|
|
}
|
|
}
|
|
|
|
if (text == "ban list")
|
|
{
|
|
obj_id room = getContainedBy (self);
|
|
string[] aList = permissionsGetBanned(room);
|
|
sendSystemMessageTestingOnly (self, "You're looking in Room " + room);
|
|
int number = aList.length;
|
|
sendSystemMessageTestingOnly (self, "There are " + number + " entries.");
|
|
if (number == 0)
|
|
{
|
|
return SCRIPT_CONTINUE;
|
|
}
|
|
for (int i=0; i < number; i++)
|
|
{
|
|
string name = aList[i];
|
|
sendSystemMessageTestingOnly (self, i + ". " + name);
|
|
}
|
|
|
|
}
|
|
return SCRIPT_CONTINUE;
|
|
} |