cleanup and fast check support
This commit is contained in:
parent
6833edbc4a
commit
68af66b16d
1 changed files with 31 additions and 16 deletions
|
|
@ -18,6 +18,18 @@ namespace BSB.Commands.Group
|
||||||
if (UUID.TryParse(args[0], out UUID targetgroup) == true)
|
if (UUID.TryParse(args[0], out UUID targetgroup) == true)
|
||||||
{
|
{
|
||||||
if (UUID.TryParse(args[2], out UUID testavatar) == true)
|
if (UUID.TryParse(args[2], out UUID testavatar) == true)
|
||||||
|
{
|
||||||
|
if (bot.FastCheckInGroup(targetgroup, testavatar) == true)
|
||||||
|
{
|
||||||
|
Dictionary<string, string> reply = new Dictionary<string, string>
|
||||||
|
{
|
||||||
|
{ "group", args[0] },
|
||||||
|
{ "avatar", args[2] },
|
||||||
|
{ "ingroup", "1" }
|
||||||
|
};
|
||||||
|
return bot.GetCommandsInterface.SmartCommandReply(true, args[1], JsonConvert.SerializeObject(reply), CommandName);
|
||||||
|
}
|
||||||
|
else
|
||||||
{
|
{
|
||||||
if (bot.MyGroups.ContainsKey(targetgroup) == true)
|
if (bot.MyGroups.ContainsKey(targetgroup) == true)
|
||||||
{
|
{
|
||||||
|
|
@ -38,6 +50,7 @@ namespace BSB.Commands.Group
|
||||||
return Failed("Unknown group");
|
return Failed("Unknown group");
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
return Failed("Unable to find avatar");
|
return Failed("Unable to find avatar");
|
||||||
|
|
@ -65,10 +78,12 @@ namespace BSB.Commands.Group
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
Dictionary<string,string> reply = new Dictionary<string, string>();
|
Dictionary<string, string> reply = new Dictionary<string, string>
|
||||||
reply.Add("group", args[0]);
|
{
|
||||||
reply.Add("avatar", args[2]);
|
{ "group", args[0] },
|
||||||
reply.Add("ingroup", return_status);
|
{ "avatar", args[2] },
|
||||||
|
{ "ingroup", return_status }
|
||||||
|
};
|
||||||
bot.GetCommandsInterface.SmartCommandReply(true, args[1], JsonConvert.SerializeObject(reply), CommandName);
|
bot.GetCommandsInterface.SmartCommandReply(true, args[1], JsonConvert.SerializeObject(reply), CommandName);
|
||||||
}
|
}
|
||||||
base.Callback(args, e);
|
base.Callback(args, e);
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue