Commit 28e561ec authored by Jonathan Michalon's avatar Jonathan Michalon

server: use API to do internal actions on client instead of direct access

parent 3b4a660b
......@@ -79,6 +79,14 @@ public class Client: Object
return Message.receive (input, cancel);
}
public bool log_in (string login_p, string password_p)
{
login = login_p;
password = password_p;
return true;
}
public bool join (Game game_p)
{
player = new Player (login);
......
......@@ -124,9 +124,9 @@ public class Server: ThreadedSocketService
/* actual registration */
if (ok) {
debug ("accepting auth for %s", msg.login);
msg.status = LoginMessage.State.OK;
client.login = msg.login;
client.password = msg.password;
msg.status = LoginMessage.State.OK;
client.log_in (msg.login, msg.password);
}
}
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment