updated to use the new config value to disable

This commit is contained in:
Madpeter 2020-05-06 17:34:59 +01:00
parent 321e3f67db
commit 06f0932862
2 changed files with 25 additions and 16 deletions

View file

@ -15,6 +15,8 @@ namespace BSB.Commands.Self
public override bool CallFunction(string[] args) public override bool CallFunction(string[] args)
{ {
if (base.CallFunction(args) == true) if (base.CallFunction(args) == true)
{
if (bot.GetAllowFunds == true)
{ {
if (UUID.TryParse(args[0], out UUID avataruuid) == true) if (UUID.TryParse(args[0], out UUID avataruuid) == true)
{ {
@ -30,6 +32,8 @@ namespace BSB.Commands.Self
} }
return Failed("Invaild avatar UUID"); return Failed("Invaild avatar UUID");
} }
return Failed("Transfer funds to avatars disabled");
}
return false; return false;
} }
} }

View file

@ -14,7 +14,10 @@ namespace BSB.Commands.Self
public override string Helpfile { get { return "Makes the bot pay a object"; } } public override string Helpfile { get { return "Makes the bot pay a object"; } }
public override bool CallFunction(string[] args) public override bool CallFunction(string[] args)
{ {
if (base.CallFunction(args) == true) if (base.CallFunction(args) == true)
{
if (bot.GetAllowFunds == true)
{ {
if (UUID.TryParse(args[0], out UUID objectuuid) == true) if (UUID.TryParse(args[0], out UUID objectuuid) == true)
{ {
@ -34,6 +37,8 @@ namespace BSB.Commands.Self
} }
return Failed("Invaild object UUID"); return Failed("Invaild object UUID");
} }
return Failed("Transfer funds to objects disabled");
}
return false; return false;
} }
} }