/*
....[@@@..[@@@..............[@.................. MUD++ is a written from
....[@..[@..[@..[@..[@..[@@@@@....[@......[@.... scratch multi-user swords and
....[@..[@..[@..[@..[@..[@..[@..[@@@@@..[@@@@@.. sorcery game written in C++.
....[@......[@..[@..[@..[@..[@....[@......[@.... This server is an ongoing
....[@......[@..[@@@@@..[@@@@@.................. development project.  All 
................................................ contributions are welcome. 
....Copyright(C).1995.Melvin.Smith.............. Enjoy. 
------------------------------------------------------------------------------
Melvin Smith (aka Fusion)         msmith@falcon.mercer.peachnet.edu 
MUD++ development mailing list    mudpp-list@spice.com
------------------------------------------------------------------------------
nameable.cc
*/

#include "nameable.h"

int	str_cmp( const char *, const char * );


bool Nameable::isName( const String & strName ) const
{
	// recode to use string class ops
 
	char buf[ BUF ];
	strcpy( buf, name.chars() );

	char *token = strtok( buf, " " );
	while( token )
	{
		if( !str_cmp( token, strName.chars() ) )
			return 1;
		token = strtok( NULL, " " );
	}
	return 0;
}