IMPORTANT NOTICE START
Since Gamespy's shutdown of their Battlefield 2 servers, on the 31st of May 2014, this solution no longer works [1]. I will keep the repository open until I can confirm that the code wont ever be useful again. There is a interesting project over at battlelog.co, but I am uncertain whether it will allow you to setup servers with all unlocks enabled.
If anyone figures this out, please tell me!
[1] http://www.reddit.com/r/Games/comments/22fz75/list_of_games_affected_by_gamespy_shutdown
IMPORTANT NOTICE END
Server software for 'cheating' a local Battlefield 2 server to allow all weapons unlocked for all players.
This was uploaded prematurely. I don't consider the quality of this code to be very good, but it works.
To install the hacked Battlefield 2 Dedicated Server, run install. To run the Battlefield 2 Dedicated Server, run the start.sh from the installation.
To run the unlockproxy, run unlockproxy.
Remember to add the following to your hosts-file (this will break the local Battlefield 2 server, if the unlockproxy is not running): 127.0.0.1 bf2web.gamespy.com