Personally I don't like the loadstring approach, as that is invoking the Lua compiler to do something which is really a runtime operation.
At the very least, do this:
for f in string.gmatch (list, "%a+") do
_G [f] = 1
end
That at least doesn't need a compile phase, which is slower. Better again, use a boolean:
for f in string.gmatch (list, "%a+") do
_G [f] = true
end
However all this looks messy. What happens if the flag from the MUD happens to be called "print"? Then you have clobbered your global print function with the number 1. Or if a flag is called "string" then your script stops working because string.gmatch won't work any more as string has changed from a function to 1.
Far, far better to make a table of flags, like this:
flags = {}
for f in string.gmatch (list, "%a+") do
flags [f] = true
end
Now you can just test flags, eg.
if flags.hum then
-- do something
end -- if
Also you can now iterate through all the flags, eg.
print "flags set = "
for k, v in pairs (flags) do
print (k)
end -- for