You should change your rcon() function. 1024 is a very small buffer size considering someone might want to get the answer to a "rcon status" or "rcon sv listuserip" packet which can easily get bigger than that. Also, at some point paintball splits the content to different packets if adding another line to the current packet exceeds a specific amount of bytes (I think 1500 is the limit), so you want to check for additional packets and append their content.