EDIT: This only happens when I join the server and choose a team. If someone else joins it works fine. I've already tried using screen and joining with Putty closed but with no success.
EDIT2: Found the issue. I had a bind in the TAB key with the autobuy exploit. I don't understand why updating the server with -beta hlbeta didn't block the autobuy bug, but at least now I know what was the problem with the server.