public static void ClientConnected(Client client) { client.Player = new Actor(); client.Player.ConnectedClient = client; client.CommandHandler = LoginCommandHandler; var settings = GetObject("settings") as Settings; client.Send(settings.Banner); client.Send(settings.MessageOfTheDay); DatabaseLock.WaitOne(); ConnectedClients.Add(client); DatabaseLock.ReleaseMutex(); }
public void HandleCommand(Client Client, String Command) { try { var matchedCommand = Parser.ParseCommand(Command, Client.Player); if (matchedCommand != null) matchedCommand.Command.Processor.Perform(matchedCommand.Match, Client.Player); else Client.Send("I do not understand."); } catch (Exception e) { Mud.ClearPendingMessages(); Client.Send(e.Message); } }