Method code for $builder._build__query_realm()

[Turn on line numbering]
arg there;
var line, realm, r, prompt;

prompt = "What realm is " + there.name() + " in? [" + .location().realm().name() + "] ";
while (!realm) {
    line = (> ._build__prompt(prompt, tostr(.location().realm())) <);
    if (!line) {
        realm = .location().realm();
    } else if (line == "@realms") {
        r = $place_lib.known_realms().union($realm.descendants());
        .tell(["Realms:", ""] + r.mmap('name).prefix("    "));
    } else {
        realm = $place_lib.match_realm(line);
        if (!realm) {
            .tell("Unknown realm \"" + line + "\", try @realms.");
        } else if (!realm.is($realm)) {
            .tell(realm.namef('ref) + " is not a realm, try @realms.");
            realm = 0;
        }
    }
}
return realm;

// $#Edited: 05 Dec 98 17:48 $user_bruce
// $#Edited: 20 Apr 04 22:12 $brandon

["// Created 26-Mar-1995 as a part of ColdCore, see: @help Credit"]

the Cold Dark