//------------------------------------------------------------------------------
// <copyright company="Telligent Systems">
//     Copyright (c) Telligent Systems Corporation.  All rights reserved.
// </copyright> 
//------------------------------------------------------------------------------

using System;
using System.Xml;
using CommunityServer.Configuration;

namespace CommunityServer.Components
{
	/// <summary>
	/// Summary description for AnonymousUserJob.
	/// </summary>
	public class AnonymousUserJob : IJob
	{
		public AnonymousUserJob()
		{
			//
			// TODO: Add constructor logic here
			//
		}

	    public void Execute(XmlNode node)
	    {
	        SiteSettingsManager.IterateSiteSettings(new SiteSettingsListIterator(CleanUsers));
	    }

        private void CleanUsers(int settingsid)
        {
            CSContext.Create(settingsid);
            UsersOnline.ClearGuests(5);
            UsersOnline.ClearMembers(10);
            
        }
	}
}
