private void updateaccount(String user)
    {
        try
        {
            int logincount = 0;
            ResultSet rs = Main.sql.doquery("SELECT * FROM bout_users WHERE username='"+ user +"' LIMIT 1");
            while (rs.next())
            {
                logincount = rs.getInt("logincount");
            }
            logincount++;

            //get date
            java.util.Date dt = new java.util.Date();
            //set date format
            java.text.SimpleDateFormat df = new java.text.SimpleDateFormat( "yyyy-MM-dd HH:mm:ss" );
            String ip = Main.getip(socket);
           
            // add later
            // online=1
            Main.sql.doupdate("UPDATE bout_users SET current_ip='"+ip+"', logincount="+logincount+", last_ip='"+ip+"', lastlogin='"+df.format(dt)+"' WHERE username='"+user+"'");
        }
        catch (Exception e) {
            debug("Error (updateAccount) : " + e.getMessage());
        }
    }