<HTML> <HEAD> <!-- This HTML file has been created by texi2html 1.51 from ProgrammersManual.texinfo on 4 March 1997 --> <TITLE>LambdaMOO Programmer's Manual - Manipulating Players</TITLE> </HEAD> <BODY> Go to the <A HREF="ProgrammersManual_1.html">first</A>, <A HREF="ProgrammersManual_50.html">previous</A>, <A HREF="ProgrammersManual_52.html">next</A>, <A HREF="ProgrammersManual_77.html">last</A> section, <A HREF="ProgrammersManual_toc.html">table of contents</A>. <P><HR><P> <H4><A NAME="SEC51" HREF="ProgrammersManual_toc.html#TOC51">Operations on Player Objects</A></H4> <P> <DL> <DT><U>Function:</U> list <B>players</B> <I>()</I> <DD><A NAME="IDX80"></A> Returns a list of the object numbers of all player objects in the database. </DL> </P> <P> <DL> <DT><U>Function:</U> int <B>is_player</B> <I>(obj <VAR>object</VAR>)</I> <DD><A NAME="IDX81"></A> Returns a true value if the given <VAR>object</VAR> is a player object and a false value otherwise. If <VAR>object</VAR> is not valid, <CODE>E_INVARG</CODE> is raised. </DL> </P> <P> <DL> <DT><U>Function:</U> none <B>set_player_flag</B> <I>(obj <VAR>object</VAR>, <VAR>value</VAR>)</I> <DD><A NAME="IDX82"></A> Confers or removes the "player object" status of the given <VAR>object</VAR>, depending upon the truth value of <VAR>value</VAR>. If <VAR>object</VAR> is not valid, <CODE>E_INVARG</CODE> is raised. If the programmer is not a wizard, then <CODE>E_PERM</CODE> is raised. </P> <P> If <VAR>value</VAR> is true, then <VAR>object</VAR> gains (or keeps) "player object" status: it will be an element of the list returned by <CODE>players()</CODE>, the expression <CODE>is_player(<VAR>object</VAR>)</CODE> will return true, and the server will treat a call to <CODE>$do_login_command()</CODE> that returns <VAR>object</VAR> as logging in the current connection. </P> <P> If <VAR>value</VAR> is false, the <VAR>object</VAR> loses (or continues to lack) "player object" status: it will not be an element of the list returned by <CODE>players()</CODE>, the expression <CODE>is_player(<VAR>object</VAR>)</CODE> will return false, and users cannot connect to <VAR>object</VAR> by name when they log into the server. In addition, if a user is connected to <VAR>object</VAR> at the time that it loses "player object" status, then that connection is immediately broken, just as if <CODE>boot_player(<VAR>object</VAR>)</CODE> had been called (see the description of <CODE>boot_player()</CODE> below). </DL> </P> <P><HR><P> Go to the <A HREF="ProgrammersManual_1.html">first</A>, <A HREF="ProgrammersManual_50.html">previous</A>, <A HREF="ProgrammersManual_52.html">next</A>, <A HREF="ProgrammersManual_77.html">last</A> section, <A HREF="ProgrammersManual_toc.html">table of contents</A>. </BODY> </HTML>