mud.h

pdirt/drv/include/mud.h · 1.9 KB

From the archive pDirt-1_tar.gz

Download the archive   « Back to the archive contents

#ifndef __MUD_H__ 
#define __MUD_H__ 

/**
 ** Functions used to manipulate the players input handler.
 ** When pushed, the previous handler is stored in a linked list. It can be
 ** restored by doing a pop.
 ** Replace simply replaces the old one, with no way back.
 **/
void    push_input_handler(void (*h)(char *str));
void    pop_input_handler(void);
void    replace_input_handler(void (*h)(char *str));

/**
 ** Functions to set up slots, or global variables for a player.
 **/
int     find_free_player_slot(void);
int     find_pl_index(int fd);
void    xsetup_globals(int plx);
void    setup_globals(int plx);
void    quit_player(void);

/**
 ** Some security checks functions
 **/
Boolean is_host_banned(char *hostname);
Boolean is_locked_host(char *hostname);
Boolean is_player_banned(char *name);
Boolean is_local(char *name);
Boolean privileged_user (char *name);
Boolean login_ok(char *name);

/**
 ** Default input handler and the function that sets everything up when
 ** login succeeded.
 **/
void    get_command(char *cmd);
void    talker(void);

/** 
 ** Login Functions (Alphabetically)
 **/
void	configure_player(char *in);	/* Before entry config. */
void    do_motd(char *cont);		/* Show Message Of The Day */
void    enter_vis(char *v);		/* Enter visibility (after do_motd) */
void    get_email(char *addr);		/* Get an email adress */
void    get_new_pass1(char *pass);	/* Get a new password */
void    get_new_pass2(char *pass);	/* Verify new password */
void    get_passwd1(char *pass);	/* Get password of exsisting player */
void    get_pname1(char *name);		/* Get name, comes after new_player() */
void    get_pname2(char *reply);	/* Check if the name was correct */
void    give_options(char *in);		/* Player menu (enter/quit/delete) */
void    kick_out_yn(char *answer);	/* Kick out already exsisting player */
void    new_player(void);		/* Start of login (show title etc) */
#endif /* Add nothing past this line... */

Site Stats

Snippets: 1791
Codebases: 571