static char *RCSid = "$Header: quit.c,v 1.7 89/10/17 02:22:09 mr-frog Exp $";

/*
 * quit.c
 *
 * Quit the game.
 *
 */

#include "misc.h"
#include "com.h"
#include "nat.h"

quit()
{
	extern	time_t lasttime;
	extern	time_t curup;
	int	secs;

	/*
	 * randomly round up to the nearest minute,
	 * charging at least 15 seconds.
	 */
/*	NAT_SET(nat_login, cnum, 0); */
	secs = max(curup - lasttime, 15);
	if (secs >= (random() % 60))
		NAT_DELTA(nat_minused, cnum, 1);
	pr("Bye-bye\n");
	tm_exit(0);
	/*NOTREACHED*/
}
