File ban.c

* Code to check for invalid names (i.e., profanity, etc.) * * Written by Sharon P. Goza *


Included Files


Preprocessor definitions

#define MAX_INVALID_NAMES 200

Global Variable ban_list

struct ban_list_element* ban_list
Visible in:  ban.c
   comm.c
Used in: do_ban()ban.c
  do_unban()ban.c
  isbanned()ban.c
  load_banned()ban.c
  unrestrict_game()comm.c
  write_ban_list()ban.c

Global Variable ban_types

const char* ban_types[]
Visible in:  ban.c
Used in: _write_one_node()ban.c
  do_ban()ban.c
  do_unban()ban.c
  load_banned()ban.c

Global Variable invalid_list

char* invalid_list[200]
Visible in:  ban.c
Used in: Read_Invalid_List()ban.c
  Valid_Name()ban.c

Global Variable num_invalid

int num_invalid
Visible in:  ban.c
   comm.c
Used in: Read_Invalid_List()ban.c
  Valid_Name()ban.c
  unrestrict_game()comm.c

External Variables

descriptor_list
extern struct descriptor_data* descriptor_list
Defined in: comm.c

Global Function Read_Invalid_List()

void Read_Invalid_List ( void )
Prototyped in: ban.c
Calls: basic_mud_log()utils.c
  get_line()utils.c
  str_dup()utils.c
  exit(), fclose(), fopen(), perror()
Called by: boot_db()db.c
References Variables: invalid_listban.c
  num_invalidban.c

Global Function Valid_Name()

int Valid_Name ( char* newname )
Prototyped in: ban.c
Calls: str_cmp()utils.c
  strcpy(), strstr()
Called by: nanny()interpreter.c
References Variables: descriptor_listcomm.c
  invalid_listban.c
  num_invalidban.c

Global Function _write_one_node()

void _write_one_node ( FILE* fp, struct ban_list_element* node )
Prototyped in: ban.c
Calls: _write_one_node()ban.c
  fprintf()
Called by: _write_one_node()ban.c
  write_ban_list()ban.c
References Variables: ban_typesban.c

Global Function do_ban()

void do_ban ( struct char_data* ch, char* argument, int cmd, int subcmd )
Prototyped in: ban.c
Calls: MAX()utils.c
  basic_mud_log()utils.c
  mudlog()utils.c
  send_to_char()comm.c
  str_cmp()utils.c
  two_arguments()interpreter.c
  write_ban_list()ban.c
  abort(), asctime(), calloc(), localtime(), perror(), sprintf(), strcpy(), strncpy(), time()
Used in:  interpreter.c
References Variables: ban_listban.c
  ban_typesban.c
  bufdb.c
  dummy_mobdb.c

Global Function do_unban()

void do_unban ( struct char_data* ch, char* argument, int cmd, int subcmd )
Prototyped in: ban.c
Calls: MAX()utils.c
  basic_mud_log()utils.c
  mudlog()utils.c
  one_argument()interpreter.c
  send_to_char()comm.c
  str_cmp()utils.c
  write_ban_list()ban.c
  free(), sprintf()
Used in:  interpreter.c
References Variables: ban_listban.c
  ban_typesban.c
  bufdb.c
  dummy_mobdb.c

Global Function isbanned()

int isbanned ( char* hostname )
Prototyped in: ban.c
Calls: MAX()utils.c
  strstr()
Called by: nanny()interpreter.c
  new_descriptor()comm.c
References Variables: ban_listban.c

Global Function load_banned()

void load_banned ( void )
Prototyped in: ban.c
Calls: basic_mud_log()utils.c
  __errno_location(), abort(), calloc(), fclose(), fopen(), fscanf(), perror(), strcmp(), strerror(), strncpy()
Called by: boot_db()db.c
References Variables: ban_listban.c
  ban_typesban.c

Global Function write_ban_list()

void write_ban_list ( void )
Prototyped in: ban.c
Calls: _write_one_node()ban.c
  fclose(), fopen(), perror()
Called by: do_ban()ban.c
  do_unban()ban.c
References Variables: ban_listban.c