enable better controls
This commit is contained in:
parent
180bdb21f3
commit
47de266915
2 changed files with 17 additions and 6 deletions
|
|
@ -16,6 +16,8 @@ namespace SecondBotEvents.Config
|
|||
settings.Add("EnableJsonOutputEvents");
|
||||
settings.Add("JsonOutputEventsTarget");
|
||||
settings.Add("AcceptFriendRequests");
|
||||
settings.Add("AcceptTeleports");
|
||||
settings.Add("AcceptFromMasterOnly");
|
||||
settings.Add("Enabled");
|
||||
}
|
||||
|
||||
|
|
@ -24,6 +26,11 @@ namespace SecondBotEvents.Config
|
|||
return ReadSettingAsBool("Enabled", true);
|
||||
}
|
||||
|
||||
public bool GetAcceptFromMasterOnly()
|
||||
{
|
||||
return ReadSettingAsBool("AcceptFromMasterOnly", true);
|
||||
}
|
||||
|
||||
public bool GetAcceptTeleports()
|
||||
{
|
||||
return ReadSettingAsBool("AcceptTeleports", true);
|
||||
|
|
@ -39,6 +46,11 @@ namespace SecondBotEvents.Config
|
|||
return ReadSettingAsBool("AcceptInventory", true);
|
||||
}
|
||||
|
||||
public bool GetAcceptFriendRequests()
|
||||
{
|
||||
return ReadSettingAsBool("AcceptFriendRequests", true);
|
||||
}
|
||||
|
||||
public string GetJsonOutputEventsTarget()
|
||||
{
|
||||
return ReadSettingAsString("JsonOutputEventsTarget", "none");
|
||||
|
|
@ -48,11 +60,6 @@ namespace SecondBotEvents.Config
|
|||
{
|
||||
return ReadSettingAsBool("EnableJsonOutputEvents", true);
|
||||
}
|
||||
|
||||
public bool GetAcceptFriendRequests()
|
||||
{
|
||||
return ReadSettingAsBool("AcceptFriendRequests", true);
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
|
|
@ -51,10 +51,14 @@ namespace SecondBotEvents.Services
|
|||
JsonOuput(false, sourceName, avatarName, "disabled by config");
|
||||
return false;
|
||||
}
|
||||
if(myConfig.GetAcceptFromMasterOnly() == false)
|
||||
{
|
||||
return true;
|
||||
}
|
||||
if (master.CommandsService.myConfig.GetEnableMasterControls() == false)
|
||||
{
|
||||
// master avatars list is not enabled. unable to continue
|
||||
JsonOuput(false, sourceName, avatarName, "masters AV list is disabled");
|
||||
JsonOuput(false, sourceName, avatarName, "masters AV list is disabled: Please set EnableMasterControls in Commands service to true");
|
||||
return false;
|
||||
}
|
||||
if (master.CommandsService.myConfig.GetMastersCSV().Contains(avatarName) == false)
|
||||
|
|
|
|||
Loading…
Reference in a new issue