ALFAIRCBot.ALFAIRCBot.OnInGameIrcCommand C# (CSharp) Метод

OnInGameIrcCommand() приватный Метод

Dispatch an in-game IRC command to its handler.
private OnInGameIrcCommand ( int PlayerId, int CharacterServerId, string Command ) : void
PlayerId int Supplies the requesting player ID.
CharacterServerId int Supplies the server ID to send the /// response information to.
Command string Supplies the command text.
Результат void
        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.)");
        }