Added PermissionHelper.cs, Permissons.cs, changed project requirmenets, and added PermissionModule() to main cs file.

This commit is contained in:
Cuken
2016-02-10 20:30:19 -07:00
parent 358d8a86a1
commit 8c6fd79fee
3 changed files with 271 additions and 0 deletions

View File

@@ -0,0 +1,44 @@
using NadekoBot.Extensions;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
namespace NadekoBot.Classes
{
static class PermissionHelper
{
public static bool ValidateBool(string passedArg)
{
if (string.IsNullOrEmpty(passedArg.Trim()))
{
throw new System.ArgumentException("No value supplied! Missing argument");
}
switch (passedArg.ToLower())
{
case "t":
case "true":
case "enabled":
return true;
case "f":
case "false":
case "disabled":
return false;
default:
throw new System.ArgumentException("Did not receive a valid boolean value");
}
}
internal static void ValidateModule(string v)
{
return;
}
internal static void ValidateCommand(string v)
{
return;
}
}
}