Fix being able to ban same player multiple times (Thanks 123DMWM).

This commit is contained in:
UnknownShadow200 2017-11-13 10:21:35 +11:00
parent f09fb5d3d1
commit f41f756127
2 changed files with 6 additions and 1 deletions

View File

@ -36,7 +36,7 @@ namespace MCGalaxy.Commands.Moderation {
if (reason == null) return;
Player who = PlayerInfo.FindExact(target);
Group group = who != null ? who.group : Group.GroupIn(args[0]);
Group group = who != null ? who.group : Group.GroupIn(target);
if (!CheckPerms(target, group, p)) return;
ModAction action = new ModAction(target, p, ModActionType.Ban, reason);

View File

@ -30,6 +30,11 @@ namespace MCGalaxy.SQL {
public readonly bool NotNull;
public readonly string DefaultValue;
public ColumnDesc(string col, ColumnType type)
: this(col, type, 0, false, false, false, null) { }
public ColumnDesc(string col, ColumnType type, ushort maxLen = 0)
: this(col, type, maxLen, false, false, false, null) { }
public ColumnDesc(string col, ColumnType type, ushort maxLen = 0,
bool autoInc = false, bool priKey = false,
bool notNull = false, string def = null) {