File ban.c

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


Included Files

  • #include "conf.h"
  • #include "sysdep.h"
  • #include <stdio.h>
  • #include <ctype.h>
  • #include <stdlib.h>
  • #include <string.h>
  • #include <sys/types.h>
  • #include <unistd.h>
  • #include <limits.h>
  • #include <sys/time.h>
  • #include <assert.h>
  • #include "structs.h"
  • #include "utils.h"
  • #include "comm.h"
  • #include "interpreter.h"
  • #include "handler.h"
  • #include "db.h"

  • Typedef namestring

    typedef char namestring[20]

    Global Variable ban_list

    void* 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

    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

    void* invalid_list
    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

  • Global Function Read_Invalid_List()

    void Read_Invalid_List ( void )
    Calls:
  • __gnu_calloc(), abort(), fclose(), fgets(), fopen(), perror(), rewind(), strlen()
  • Called by:
  • boot_db() : db.c
  • References Variables:
  • invalid_list : ban.c
  • num_invalid : ban.c

  • Global Function Valid_Name()

    int Valid_Name ( char* newname )
    Calls:
  • strcpy(), strstr()
  • Called by:
  • nanny() : interpreter.c
  • References Variables:
  • invalid_list : ban.c
  • num_invalid : ban.c

  • Global Function _write_one_node()

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

  • Global Function do_ban()

    void do_ban ( struct char_data* ch, char* argument, int cmd, int subcmd )
    Calls:
  • MAX() : utils.c
  • mudlog() : utils.c
  • send_to_char() : comm.c
  • str_cmp() : utils.c
  • two_arguments() : interpreter.c
  • write_ban_list() : ban.c
  • __gnu_calloc(), abort(), asctime(), localtime(), perror(), sprintf(), strcpy(), strncpy(), time()
  • Used in:
  • : interpreter.c
  • References Variables:
  • ban_list : ban.c
  • ban_types : ban.c
  • buf

  • Global Function do_unban()

    void do_unban ( struct char_data* ch, char* argument, int cmd, int subcmd )
    Calls:
  • MAX() : 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_list : ban.c
  • ban_types : ban.c
  • buf

  • Global Function isbanned()

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

  • Global Function load_banned()

    void load_banned ( void )
    Calls:
  • __gnu_calloc(), abort(), fclose(), fopen(), fscanf(), perror(), strcmp(), strncpy()
  • Called by:
  • boot_db() : db.c
  • References Variables:
  • ban_list : ban.c
  • ban_types : ban.c

  • Global Function write_ban_list()

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