They don't actually get the items by the command. When you play tf2, after some time you can get weapons for free (random item drop). When you drop an item you get a notification on the menu and when you open it the server will get a notification that you "found" and item. This guy had a notification but didn't open it, then he wrote the fake command and opened the ping and the server got a message that he got an item, making it seem that he, in fact, got the item from a command.