Skip to content

Commit

Permalink
Implement chat command prefix config option
Browse files Browse the repository at this point in the history
  • Loading branch information
MrBlue committed Dec 9, 2023
1 parent 596fee3 commit 588e665
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions src/SevenDaysToDieHooks.cs
Original file line number Diff line number Diff line change
Expand Up @@ -59,9 +59,10 @@ private object IOnPlayerChat(ClientInfo clientInfo, string message)
if (clientInfo != null && !string.IsNullOrEmpty(message))
{
// Check if it is a chat command
if (message[0] == '/')
string chatCommandPrefix = CommandHandler.GetChatCommandPrefix(message);
if (chatCommandPrefix != null)
{
Covalence.CommandSystem.ParseCommand(message.TrimStart('/'), out string cmd, out string[] args);
Covalence.CommandSystem.ParseCommand(message.Substring(chatCommandPrefix.Length), out string cmd, out string[] args);
if (!string.IsNullOrEmpty(cmd))
{
// Is the command blocked?
Expand Down

0 comments on commit 588e665

Please sign in to comment.