Object command signing opt out for masters
This commit is contained in:
parent
24013d0f9c
commit
c789e53910
3 changed files with 12 additions and 0 deletions
|
|
@ -35,6 +35,7 @@ ENV basic_Username='' \
|
|||
commands_EnforceTimeWindow='false' \
|
||||
commands_TimeWindowSecs=35 \
|
||||
commands_Enabled='true' \
|
||||
commands_ObjectMasterOptout='false' \
|
||||
datastore_AutoCleanAvatars='true' \
|
||||
datastore_AvatarsCleanAfterMins=10 \
|
||||
datastore_LocalChatHistoryLimit=120 \
|
||||
|
|
|
|||
|
|
@ -19,6 +19,7 @@ namespace SecondBotEvents.Config
|
|||
settings.Add("EnforceTimeWindow");
|
||||
settings.Add("TimeWindowSecs");
|
||||
settings.Add("Enabled");
|
||||
settings.Add("ObjectMasterOptout");
|
||||
settings.Add("HideStatusOutput");
|
||||
}
|
||||
|
||||
|
|
@ -27,6 +28,11 @@ namespace SecondBotEvents.Config
|
|||
return ReadSettingAsBool("Enabled", true);
|
||||
}
|
||||
|
||||
public bool GetObjectMasterOptout()
|
||||
{
|
||||
return ReadSettingAsBool("ObjectMasterOptout", false);
|
||||
}
|
||||
|
||||
public string[] GetMastersCSV()
|
||||
{
|
||||
return ReadSettingAsString("MastersCSV", "Madpeter Zond").Split(",");
|
||||
|
|
|
|||
|
|
@ -140,6 +140,11 @@ namespace SecondBotEvents.Services
|
|||
case InstantMessageDialog.MessageFromObject:
|
||||
{
|
||||
acceptMessage = true;
|
||||
if(myConfig.GetObjectMasterOptout() == true)
|
||||
{
|
||||
string ownername = master.DataStoreService.GetAvatarName(e.IM.FromAgentID);
|
||||
requireSigning = !myConfig.GetMastersCSV().Contains(ownername);
|
||||
}
|
||||
break;
|
||||
}
|
||||
case InstantMessageDialog.MessageFromAgent: // shared with SessionSend
|
||||
|
|
|
|||
Loading…
Reference in a new issue