Exemplo n.º 1
0
 public Database(String basePath, MudCore core)
 {
     this.staticPath = basePath + "static/";
     this.serializedPath = basePath + "serialized/";
     this.core = core;
 }
Exemplo n.º 2
0
        public override void Execute(MudCore core)
        {
            core._databaseLock.WaitOne();
            Client client = null;

            if (player is Client) client = player as Client;
            else
            {
                var path = player.GetLocalProperty("@path") as String;
                if (path != null)
                    foreach (var c in core.ConnectedClients)
                        if (c.player.GetLocalProperty("@path") == path)
                            client = c;
            }

            if (client != null)
                client.Disconnect();

            core._databaseLock.ReleaseMutex();
        }