[Package Index | Mudlib Index | Effect Index]

File /obj/handlers/peopler.c

This prints out nicely formated lists of information. It ius used by the people, finger etc commands.

Written by Pinkfish

Includes

This class includes the following files /include/peopler.h

Method index

Public Functions

These are functions that everyone can access.

do_command
int do_command(mixed * pattern,
               string constraint,
               function sort_func,
               int only_duplicates)

This method is the main access point to the peopler. It prints out the commands. The optional sort function allows you to sort on somethign other than the name of the player.

The format of the pattern string is an array with every second element being the type and the other element being the width of the printable string.

   ({ type, width,  ... })
With strings the width is the string...

Parameters:
pattern - the pattern to print with
constraint - All the names should start with this, 0 fo rnone
sort_func - the function to sort with (optional)
only_duplicates - only print entries whicxh are the same (using the sort_func

Returns:
0 on failure, 1 on success

See also:
help::people.c, help::netstat.c, help::snetstat.c, help::netdups.c, help::terms.c and help::dirs .c


get_people
object * get_people(string str)

This method returns the list of people using the 'str' as a constraint. So it only shows the people who match with the str.

Parameters:
str - the constraint string

Returns:
the array of people


review
int review()

The review command. Prints out the current settings for the commands.

Parameters:
str - the player name restriction string

Returns:
0 if it failed, 1 if it succeeded

See also:
help::review .c


set_var
int set_var(string str)

Sets a variable. Sets the variable to the specified value.

Parameters:
the - name and arg of the varible

Returns:
0 on failure, 1 on success