10 Mar, 2009, boblinski wrote in the 41st comment:
Votes: 0
So if you have two players:

Orin and Orindal.. Orin can't be targeted by most immortal commands? ever
11 Mar, 2009, Zeno wrote in the 42nd comment:
Votes: 0
If you enter the room with Orin and Orindal is somewhere else, pretty sure it wouldn't be a problem.
11 Mar, 2009, David Haley wrote in the 43rd comment:
Votes: 0
Some codebases also do a first pass for exact match, followed by another with prefix match, in which case the winner is determined by whichever happens to come first in the list of things. Not sure if your codebase works that way.
11 Mar, 2009, boblinski wrote in the 44th comment:
Votes: 0
David Haley said:
Some codebases also do a first pass for exact match, followed by another with prefix match, in which case the winner is determined by whichever happens to come first in the list of things. Not sure if your codebase works that way.


If I type "concept orin" it doesn't target Orin, it targets Orindal..

How might I make my mud do a pass for an exact match first?
11 Mar, 2009, David Haley wrote in the 45th comment:
Votes: 0
You would need to edit get_char_world or appropriate char lookup function (you might be using get_char_room instead) to have one loop over characters that does something like str_cmp, and then leave the normal loop that uses prefix matching.
11 Mar, 2009, Sharmair wrote in the 46th comment:
Votes: 0
When you have two names like that, you will only have the problem like you are having
if the longer name is first in the list. But if you do have this problem (and you do not
do the two pass targeting), you might be able to use something like sam and 2.sam. I
am pretty sure the number.name syntax goes back at least to merc.

You might want to look at the SMAUG code for how to do the two pass idea, but it really
is just having two loops, one using exact, and the other prefix matching. You probably
have just the prefixing loop in your code now, you would just copy that loop, but use the
exact version of the compare function, and put the new loop just before the old one (if
your code uses the number thing, you will probably have to also reset some count
variable to zero before the 2nd loop).

edit: I peeked at the ROM code, you do have a counter called count and the exact
version of the compare function is is_exact_name(char*, char*).
40.0/46