/*******************************\
* ACOM.C			*
* (c)1986-87, Patrick E. Hughes	*
\*******************************/

#include <exec/types.h>
#include <stdio.h>
#include <fcntl.h>
#include <intuition/intuition.h>
#include <time.h>
#include "System.h"
#include "Defines.h"

/***********************\
* GLOBAL VARIABLE LIST	*
\***********************/

extern struct System System;

extern int Whence_The_Logon;
extern long system_time;
extern struct User User;

static char string[133];

/***************\
* ACOM()	*
\***************/
int ACom()
{
int ch, stat;

if(User.Slot_Number==0) { return(FAILURE); }
PutStr("Account Statistics\r\n\r\n");

StatRollMessage("Account");

FOREVER
	{
	sprintf(string,"Account [%u]\r\n",User.Slot_Number);
	PutStr(string);
	sprintf(string,"   Name: %s\r\n",User.Name);
	PutStr(string);
	sprintf(string,"   Pass: %s\r\n",User.Pass);
	PutStr(string);

	strcpy(string," Status: ");
	if(User.Sec_Status==0)
		{
		strcat(string,"Guest\r\n");
		}
	else if(User.Sec_Status==1)
		{
		strcat(string,"New\r\n");
		}
	else if(User.Sec_Status==2)
		{
		strcat(string,"Valid\r\n");
		}
	else if(User.Sec_Status==255)
		{
		strcat(string,"Sysop\r\n");
		}
	else { strcat(string,"Valid\r\n"); }

	PutStr(string);
	break;
	}

PutStr("\r\n");
}
