@
cyberinferno: you can use the game_login.php for registering who is logged, but I do not recommend to use it, because you will not get accurate logins. As you may know that php what it does is check against the database if the password that was sent on the GET request to the web, matches the password stored in the database, and if so, it creates the .txt file that is used by DBSRV to create the socket for the client. But, as you may know too, that does not guarantees that the account will be login into the server. Why I say that? well consider this scenario: your server needs to run /openserver to allow users to get in, while you don't run /openserver players are stuck on the Server selection window, which is AFTER the login window, so the login passed (game_login.php) but you still not login into the server. Another common scenario will be when your server is under maintenance, you are not running any zone neither dbsrv, but your website is on (where you have the game_login.php) clients will pass the login verification and again will be stuck on server selection.
So if you want to be accurate with the info of the logged characters on the server, then, as dTantra said, hook server functions. Where is wrong dTantra, or at least he didn't said well, is that there is no
login function on the server, what server have, is a function with a switch that process all client requirements, one of them is the Login request, another is the character selection, and so on.
And for the logout, just hook CUser::CloseUser(void) function. Im specific with the class because there are 2 CloseUser functions, one on CUser and the other in Server.cpp.
I saw in another of your post that you have the old c++ code of the zonesrv.exe, so go to ProcessClientMessage and find the value of the switch that you need for what you want to do, for example one of the switch is CSP_REQ_CHAR_INIT and another one is CSP_REQ_CHAR_SELECT or CSP_REQ_LOGIN, check what each does and which one gives what you want.
If you need more help let me know. I will not charge you any fees jajajajaj
Regards