Fixed console parse gm command crash on select commands

Also fixed an issue with socket flushing

Signed-off-by: shennetsind <ind@henn.et>
MEMORY SLAHER IS IN TOWN

And 19mb of memory goes down (32bit users should get a ~8.5mb memory reduction)
Special Thanks to pan!

Signed-off-by: shennetsind <ind@henn.et>