Liberty Unleashed Global Watchlist ModuleWith the help of AdTec_224 and VRocker I have created a module for the global watchlist that stormeus set up a few days ago. The basic idea is that it will grab the watchlist from the Liberty Unleashed site every 6 hours and on server start.
This module allows server owners to plug it in and decide what they want to do with anyone found on the watchlist, such as kick or ban the player. The watchlist will be updated and mainted by the Liberty Unleashed Staff meaning that you don't need to worry about the data being wrong.
The scripting functions that this module includes are:
Watchlist_CheckName( string name );
This will check the specified name against the cached watchlist, if theres a match it will return true.
function onPlayerJoin( pPlayer )
{
local check = Watchlist_CheckName( pPlayer.Name );
if ( check )
{
// Do something with the player.
}
return 1;
}
Watchlist_ForceUpdate( void );
This will force the server to update the watchlist, we have made it so that you can only do this one every six hours.
function onPlayerJoin( pPlayer )
{
Watchlist_ForceUpdate();
}
Watchlist_SetUpdateInterval( int interval )
This will set the automatic update interval, the minimum and default time is 6 hours.
function onScriptLoad()
{
Watchlist_SetUpdateInterval( 21600000 ); // This will set the update interval to every six hours (in ticks). 1 second is 1000 ticks.
}
The source code for this module can be found
http://force.vrocker-hosting.co.uk/downloads/watchlist/sourcecode.zip.
To download the modules click
http://force.vrocker-hosting.co.uk/downloads/watchlist/modules.zip.
Installing this module is as easy as adding LU_Watchlist.(dll/so) to your modules folder and calling LoadModule( "LU_Watchlist" ); on the onScriptLoad event.
We will try and maintain this module as best as we can and might even expand on its functionality in the future.
If you find any bugs let us know as soon as possible!