-
Notifications
You must be signed in to change notification settings - Fork 23
/
ban.h
executable file
·56 lines (49 loc) · 1.49 KB
/
ban.h
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
/**
* @file ban.h
* Header file for the ban system (ban.c).
*
* Part of the core tbaMUD source code distribution, which is a derivative
* of, and continuation of, CircleMUD.
*
* All rights reserved. See license for complete information.
* Copyright (C) 1993, 94 by the Trustees of the Johns Hopkins University
* CircleMUD is based on DikuMUD, Copyright (C) 1990, 1991.
*
* @todo Utility functions that could easily be moved elsewhere have been
* marked. Suggest a review of all utility functions (aka. non ACMDs) and
* determine if the utility functions should be placed into a lower level
* shared module.
*
*/
#ifndef _BAN_H_
#define _BAN_H_
/* don't change these */
#define BAN_NOT 0
#define BAN_NEW 1
#define BAN_SELECT 2
#define BAN_ALL 3
#define BANNED_SITE_LENGTH 50
struct ban_list_element
{
char site[BANNED_SITE_LENGTH + 1];
int type;
time_t date;
char name[MAX_NAME_LENGTH + 1];
struct ban_list_element *next;
};
/* Global functions */
/* Utility Functions */
void load_banned(void);
int isbanned(char *hostname);
int valid_name(char *newname);
void read_invalid_list(void);
void free_invalid_list(void);
/* Command functions without subcommands */
ACMD_DECL(do_ban);
ACMD_DECL(do_unban);
/* Global buffering */
#ifndef __BAN_C__
extern struct ban_list_element *ban_list;
extern int num_invalid;
#endif /*__BAN_C__ */
#endif /* _BAN_H_*/