_force.c

umud/CMD/_force.c · 660 B

From the archive umud1.13.tar.gz

Download the archive   « Back to the archive contents

/*
	Copyright (C) 1991, Marcus J. Ranum. All rights reserved.
*/

#ifndef	lint
static	char	RCSid[] = "$Header: /usr/users/mjr/hacks/umud/CMD/RCS/_force.c,v 1.1 91/07/04 17:33:21 mjr Rel $";
#endif

/* configure all options BEFORE including system stuff. */
#include	"config.h"


#include	<stdio.h>

#include	"mud.h"
#include	"match.h"
#include	"vars.h"


/*
submit a command as someone else
*/

/* ARGSUSED */
cmd__force(argc,argv,who,aswho)
int	argc;
char	*argv[];
char	*who;
char	*aswho;
{
	char	ob[MAXOID];
	int	ret;

	if(matchlocal(who,argv[1],ut_loc(who),MTCH_UNIQ|MTCH_MEOK|MTCH_NONLOC,ob))
		return(1);

	ret = run(ob,ob,argv[2],0,0,1);
	return(ret);
}

Site Stats

Snippets: 1791
Codebases: 571