private void OnInGameIrcCommand(int PlayerId, int CharacterServerId, string Command)
{
foreach (IngameIrcCommand CommandDescriptor in IngameCommands)
{
if (CommandDescriptor.ExactMatch && CommandDescriptor.Prefix == Command)
{
CommandDescriptor.CommandHandler(PlayerId, CharacterServerId, null);
return;
}
else if (!CommandDescriptor.ExactMatch && (Command.StartsWith(CommandDescriptor.Prefix + " ") || Command.Equals(CommandDescriptor.Prefix)))
{
CommandDescriptor.CommandHandler(PlayerId, CharacterServerId, Command.Substring(CommandDescriptor.Prefix.Length));
return;
}
}
SendMessageToPlayer(PlayerId, CharacterServerId, "Unrecognized IRC gateway command. (Try #irc /help for more information.)");
}