New master lfun query_userlist().
Introduces a new master function for querying the
userlist (i.e. data from the secure savefiles).
Contrary to get_userinfo() it returns specific
records from the userlist instead of a whole array.
The existing get_userinfo() function had a very
ill-defined interface. It returned an array which
was usually accessed by the *internal* symbolic
constants from userinfo.h plus an offset. These
could therefore never be changed internally. It
was also completely undocumented.
Also removes the now obsolete query_player_object()
which was also undocumented and used at only two
places (one being the master itself).
Change-Id: I5948deb69fd750dadd746f9089ba9ee9170c8a81
diff --git a/obj/tools/teller/t_player.c b/obj/tools/teller/t_player.c
index d457038..b9ced9d 100644
--- a/obj/tools/teller/t_player.c
+++ b/obj/tools/teller/t_player.c
@@ -21,11 +21,12 @@
_query_race()
{
- if( race ) return race;
-
- return "/secure/master"
- ->query_player_object(lower_case(name))
- ->QueryProp(P_RACE);
+ if( race )
+ return race;
+ string shell = master()->query_userlist(lower_case(name), USER_OBJECT);
+ if (shell)
+ race = shell->QueryProp(P_RACE);
+ return race;
}
_query_hands()