Skip to content

Commit 36836a7

Browse files
committed
douplicated commands are also upper and lowercase
1 parent d57eeb7 commit 36836a7

File tree

1 file changed

+3
-4
lines changed

1 file changed

+3
-4
lines changed

CustomCommands/Services/RegisterCommands.cs

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -39,8 +39,7 @@ public void AddCommands(Commands com)
3939

4040
var command = com;
4141

42-
Logger.LogInformation(info.ArgCount.ToString());
43-
if (info.ArgCount > 0)
42+
if (info.ArgCount > 1)
4443
command = PluginGlobals.CustomCommands.Find(x => x.Command.Contains(aliases[i])) ?? com;
4544

4645
if (command.Permission.PermissionList.Count > 0 && command.Permission != null)
@@ -70,12 +69,12 @@ public List<Commands> CheckForDuplicateCommands(List<Commands> comms)
7069

7170
foreach (var alias in aliases)
7271
{
73-
if (commandNames.Contains(alias))
72+
if (commandNames.Contains(alias.ToLower()))
7473
{
7574
duplicateCommands.Add(com);
7675
continue;
7776
}
78-
commandNames.Add(alias);
77+
commandNames.Add(alias.ToLower());
7978
}
8079
}
8180

0 commit comments

Comments
 (0)