Subject: Matching & the Server

From: Aaron Oppenheimer <[email-masked]>
Date: Wed, 8 Sep 1993 12:11:52 -0700

Hi all,

I'm trying to implement "suffix matching" in our server here inside HP. What
I'd like is to have aliases on objects of the form "*foo" which would be
matched if a player said "get barfoo". The main reason for this is to
implement objects that represent groups of other objects; for instance, an
object called "ten coins" would have an alias of "*coins" which would be
matched by "drop all coins", "drop 4 coins", or "drop coins". The object
then checks dobjstr to see how much of itself to split off and drop.

So, I've changed $string_utils:match so that it accepts the "*foo" form and
counts them as partial matches. $room:look uses $string_utils:match and so it
works fine. But... what matching utility does the server itself use? Or is it
hard coded? In other words, if I say "get barfoo", the parser can't find the
barfoo object, and calls huh. If I'm lucky the parser calls some other MOO
matching code to do this and I just can't find it; otherwise, I'm outta luck,
short of hacking the huh code or having aliases of {"one coin","two coins"...
"fifty coins"}.

Thanks for any help.

-Aaron

=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
Aaron Oppenheimer         [email-masked]         Medical Products Group
Hewlett Packard Co.                                         Waltham, MA
=-=-=-=-=-=  I can hardly speak for myself, much less HP. =-=-=-=-=-=-=

---

From: Pavel Curtis <[email-masked]>
Date: Wed, 8 Sep 1993 14:56:12 -0700

> Date:	Wed, 8 Sep 1993 12:11:52 -0700
> From:	Aaron Oppenheimer <[email-masked]>
> 
> I'm trying to implement "suffix matching" in our server ...
> 
> But... what matching utility does the server itself use? ...

The server's matching algorithm is hard-coded.

	Pavel