Skip to content

Commit

Permalink
Adds Case Insensitivity for Registered Commands and Phrases
Browse files Browse the repository at this point in the history
- Adds case insensitivity for commands in RegisterPlayerCommand and RegisterAdminCommand
- Adds case insensitivity for phrases in RegisterPlayerPhrase
  • Loading branch information
data-bomb committed Mar 17, 2024
1 parent dcd635c commit 5e3b75d
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion Si_AdminMod/AdminMethods.cs
Original file line number Diff line number Diff line change
Expand Up @@ -66,7 +66,7 @@ public static bool UnregisterAdminCommand(String adminCommand)
{
foreach (AdminCommand command in AdminCommands)
{
if (command.AdminCommandText == commandText)
if (String.Equals(command.AdminCommandText, commandText, StringComparison.OrdinalIgnoreCase))
{
return command;
}
Expand Down
4 changes: 2 additions & 2 deletions Si_AdminMod/PlayerMethods.cs
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ public static class PlayerMethods
{
foreach (PlayerCommand command in PlayerCommands)
{
if (command.CommandName == commandText)
if (String.Equals(command.CommandName, commandText, StringComparison.OrdinalIgnoreCase))
{
return command;
}
Expand All @@ -44,7 +44,7 @@ public static class PlayerMethods
{
foreach (PlayerCommand phrase in PlayerPhrases)
{
if (phrase.CommandName == phraseText)
if (String.Equals(phrase.CommandName, phraseText, StringComparison.OrdinalIgnoreCase))
{
return phrase;
}
Expand Down

0 comments on commit 5e3b75d

Please sign in to comment.