public static void Login(string username, string passhash)
{
if (Validate(username, passhash))
{
time = string.Format("{0:yyyy.MM.dd 0:HH:mm:ss tt}", DateTime.Now);
rdr = new MySqlCommand("SELECT lastin FROM login WHERE username='******';", conn).ExecuteReader();
while (rdr.Read()) {
Console.WriteLine("User's last sign in was: " + rdr["lastin"]);
}
rdr.Close();
new MySqlCommand("UPDATE login SET lastin='" + time + "' WHERE username='******';", conn).ExecuteNonQuery();
}
Console.WriteLine("HHHHhhhh");
//TODO:
//
//If the username exists, check that the password hash matches.
//
//If the username does not exist, be like "No user found".
//
//Else, If the password hash matches, Sign in.
//Set the current player to active
//forward/bind socket to control an Object?
//Note the timestamp and IP of the login in the database
//Send all of the necessary information back to the client:
}