Пример #1
0
        public static void AddAuditEntry(GameClient client, int type, int subType, string oldValue, string newValue)
        {
            if (!ServerProperties.Properties.ENABLE_AUDIT_LOG)
                return;

            // create the transaction
            var transactionHistory = new AuditEntry
                                        {
                                            AuditTime = DateTime.Now,
                                            AuditType = type,
                                            AuditSubtype = subType,
                                            OldValue = oldValue,
                                            NewValue = newValue
                                        };

            // make sure account isn't null (no idea why it'd be)
            if (client.Account != null)
            {
                transactionHistory.AccountID = client.Account.ObjectId;
            }

            // set the remote host
            transactionHistory.RemoteHost = client.TcpEndpointAddress;

            _updateLock.Enter();

            try
            {
                // add it to the queue
                _queuedAuditEntries.Add(transactionHistory);
            }
            finally
            {
                _updateLock.Exit();
            }
        }
Пример #2
0
        public static void AddAuditEntry(int type, int subType, string oldValue, string newValue)
        {
            if (!ServerProperties.Properties.ENABLE_AUDIT_LOG)
                return;

            // create the transaction
            var transactionHistory = new AuditEntry
                                        {
                                            AuditTime = DateTime.Now,
                                            AuditType = type,
                                            AuditSubtype = subType,
                                            OldValue = oldValue,
                                            NewValue = newValue
                                        };

            _updateLock.Enter();

            try
            {
                // add it to the queue
                _queuedAuditEntries.Add(transactionHistory);
            }
            finally
            {
                _updateLock.Exit();
            }
        }