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
Merge pull request #2 from john01dav/master

updating fork