by divVerent » Wed Mar 11, 2009 6:50 am
Personally, I have absolutely no interest in this feature, as it's really not a good idea to do this in an open source game.
But as sv_public is forced 0, its harm should be limited.
I told you to fix the sv_public handling a bit, and I'll ask LordHavoc if he wants that feature in the engine.
Some other thing to consider: join_password is a cvar. This should rather be a second argument to the "connect" command, and only be used once. Also, the engine should catch the error message when trying to join a password protected server without password, and issue some fixed console command (so menu QC can, for example, catch it and show a password dialog). If it stays the current way, a server can easily be modified to catch the password of everyone that joins, if they forgot to unset it after joining a private server.
This would easily be fixed by using the join_password cvar only for the server (to check if someone is allowed to join), and by using an extra char joinpassword[SOMELENGTH] in the client static structure "cls". The "connect" command would copy its second argument into this, so connecting can use it. You'll need special care for the listen server then (e.g. you could always allow connections from the LOOPBACK netconnection, which should be easier to do than to make sure to send the right password over loopback).
But, apart from this issue you're going the right approach to implement this.
1. Open Notepad
2. Paste: ÿþMSMSMS
3. Save
4. Open the file in Notepad again
You can vary the number of "MS", so you can clearly see it's MS which is causing it.