The check you are looking for is here :
github.com/tbamud/tbamud/blob/master/src/act.movement.c#L419
(and a couple of lines higher up)
Code:
if (*dir) { /* a direction was specified */
if ((door = search_block(dir, dirs, FALSE)) == -1) { /* Partial Match */
if ((door = search_block(dir, autoexits, FALSE)) == -1) { /* Check 'short' dirs too */
send_to_char(ch, "That's not a direction.\r\n");
return (-1);
}
}
if (EXIT(ch, door)) { /* Braces added according to indent. -gg */
if (EXIT(ch, door)->keyword) {
if (is_name(type, EXIT(ch, door)->keyword)) // <--- this need changing
return (door);
else {
send_to_char(ch, "I see no %s there.\r\n", type);
return (-1);
}
} else
return (door);
} else {
send_to_char(ch, "I really don't see how you can %s anything there.\r\n", cmdname);
return (-1);
}
} else { /* try to locate the keyword */
if (!*type) {
send_to_char(ch, "What is it you want to %s?\r\n", cmdname);
return (-1);
}
for (door = 0; door < DIR_COUNT; door++)
{
if (EXIT(ch, door))
{
if (EXIT(ch, door)->keyword)
{
if (isname(type, EXIT(ch, door)->keyword)) // <--- and this
{
if ((!IS_NPC(ch)) && (!PRF_FLAGGED(ch, PRF_AUTODOOR)))
This is some really hairy code, if you ask me. Definitely high cyclomatic complexity.
But what you want to do here is add a check:
Code:
if ((IS_SET(EXIT(ch, door)->exit_info, EX_HIDDEN)) ? is_name(type, EXIT(ch, door)->keyword) : isname(type, EXIT(ch, door)->keyword))
It's not really readable like this, and a refactor would move this to a nicely named function. But what we're doing is using is_name() for hidden exits and isname() for non-hidden. is_name() does not allow abbreviations.