Medo42/Gang-Garrison-2 — pull request #104 by TazeTSchnitzel (2013-01-12 04:12:14+00:00)
Title: Added server plugins support (plugins server asks client to use)

Adds two gg2.ini fields under `Server`, `ServerPluginList` and `ServerPluginsRequired`. The former is a comma-separated list of plugin names (e.g. `nogravity,deathmatch` or an empty string), and the latter is a boolean value.

Clients that connect to a server are told the plugin list and whether they are required or not. If they are required, the player is prompted to either choose to use them, or to stop connecting to the server. If they are not required, the player is prompted as to whether to use them or not. The prompt mentions the plugin names and their source (the `PLUGIN_SOURCE` constant, `http://www.ganggarrison.com/plugins/`, could be changed for mods etc.).

If the plugins are used, the client fetches each one from `http://www.ganggarrison.com/plugins/%PLUGINNAME%.gml` (or whatever `PLUGIN_SOURCE` is), and executes it. The plugin file is only temporarily saved in the working directory, and the contents of the Plugins folder is not touched. When used, the client forces the user to either quit or restart GG2 if they disconnect, since plugins tend to mess with game state. If they choose to restart, the Faucet logo screen is skipped.