Kick user when logging in. (Ghost fix)
Brought to you by:
joohn,
roshansingh
This is my attempt at a fix for the ghost user
problems. It simply does what the nmdc hub does, it
kicks the already logged in user when someone logs in.
I've only tested it briefly, won't promise it works and
it might morph the hub into a memory eating black void,
who knows. But hopefully someone will iron it out.
It adds a new variable to the user_t struct. This could
be dynamically allocated instead but for the moment it
was easier to make it static. No problems with
forgetting to free().
Don't use this on any important hubs :)
NMDC style login. (Kicks already logged in user)
Logged In: YES
user_id=584531
Does this compare the IP addresses of the new user and the
existing user, if both nicks are the same, before kicking m8 ?
Logged In: YES
user_id=46238
It only disconnects registered users ghosts, and only if the
password is correct.
Logged In: YES
user_id=46238
It only disconnects the existing user if a registered user
logs in. So the user must supply a correct password.