added some code for global flags

they are not working yet as in they have no effect. however you can set
them using /setflagglobally and the data will be saved