/* Autoconf patching by David Hedbor, neotron@lysator.liu.se */
/*********************************************************************/
/* file: new.c - new misc commands                                   */
/*                             TINTIN III                            */
/*          (T)he K(I)cki(N) (T)ickin D(I)kumud Clie(N)t             */
/*                     coded by peter unold 1992                     */
/*********************************************************************/

/* file @@@added -- perry */

#ifdef HAVE_STRING_H
#include <string.h>
#else
#ifdef HAVE_STRINGS_H
#include <strings.h>
#endif
#endif

#include <ctype.h>
#include "tintin.h"

#ifdef HAVE_STDLIB_H
#include <stdlib.h>
#endif

/* externs */
extern int case_insensitive;

/*
 * Sleeps tintin. You will be frozen during the sleep.
 */
void delay_command(arg)
	char *arg;
{
	int delay;

	if ((delay = atoi(arg)) <= 0)
		delay = 1;

	sleep(delay);
}

/*
 * Toggles whether or not case matters in checking for actions.
 */
void case_command(ses)
	struct session *ses;
{
	case_insensitive = !case_insensitive;

	if (case_insensitive)
		tintin_puts2("#Ok. Actions no longer check for case matching.", NULL);
	else
		tintin_puts2("#Ok. Actions are checked for case.", NULL);
}