1# ACCESS.ALLOW - Game access allowance rules
2#----------------------------------------------------------------------------
3# Access to the game is based on the user's IP address and the current time.
4# These are matched against a set of rules and if a match is detected, a
5# proper message is sent back and the connection is shutdown.
6#
7# This facility is active only if ACCESS_CONTROL has been defined in config.h
8# If ACCESS_LOG is defined in config.h, all checks and their results are
9# logged in the specified file.
10#
11# The rules are read from the file ACCESS_FILE (defined in config.h,
12# typically "ACCESS.ALLOW" with a name relative to the mudlib directory).
13# Every line specifies one rule and has to follow the syntax given below.
14# Lines with a '#' as first character count as comments and are ignored, as
15# are lines which do not conform to the rule syntax (but except for empty
16# lines this should be relied upon).
17#
18# The rule file is (re)read whenever the gamedriver detects a change in its
19# timestamp.
20#
21# The syntax for a rule is (no leading whitespace allowed!):
22#
23#   <ipnum>:[p<port>]:<class>:<max>:<start>:<end>:<text>
24#   <ipnum>:[p<port>]:<class>:<max>:h<hours>:w<days>:m=<text>
25#
26# where
27#   ipnum:  <byte>.<byte>.<byte>.<byte>, with byte = * or number
28#             There is only loose error checking - specifying an illegal
29#             address will have interesting consequences, but would
30#             most likely cause no error to occur.
31#   port:   the port number to which the connection is made. Omission
32#             means 'any port'.
33#   class:  number
34#   max:    the maximum number of users, a number. The value -1 allows
35#             an unlimited number of users.
36#   start:  hour this rule starts to be valid (0..23).
37#   end:    hour this rule ceases to be valid (0..23).
38#             Setting both start and end to 0 skips any time check.
39#   hours:  hours this rule is valid.
40#             This form allows several entries, separated with a ','.
41#             Every entry can be a single hour (0..23), or a range in the
42#             form '<start>-<end>'
43#             Omitting the entry skips any time check.
44#   days:   the days this rule is valid.
45#             The syntax is similar to <hours> except for the
46#             allowable values: the days Sunday..Saturday are given as
47#             the numbers 0..6.
48#             Omitting the entry skips any day check.
49#   text:   string to send if the rule matches.
50#
51# A class is defined by the first rule using it's number. This
52# definition specifies the allowable <max>imum of users and the <text>
53# to send. Subsequent rules for the same class just add new ipnumber/
54# time rules, but don't change <max> or <text>
55#
56# ORDER MATTERS. That means if you allow 129.*.*.*, you have to put
57# any restrictions on 129.132.*.* BEFORE this rule.
58#
59# Addresses not matching any rule at all are not allowed to connect.  To get
60# around this, add an appropriate 'allow-all' rule *.*.*.* at the very end.
61#
62# A typical rulefile would look like this one:
63
64# SPARC cluster has access denied. Class 1
65129.132.122.*:1:0:0:0:LPMUD access denied for your cluster.
66
67# CALL-1A0 has access limited to some maximum, for now 5 logins. Class 2
68129.132.106.*:2:5:8:20:Sorry, LPMUD is currently full.
69
70# CALL-1A0 at all other times, its a 10 limit.
71#   Due to the rule order, this is effectively limited to times
72#   outside 8-20.
73129.132.106.*:3:10:0:0:Sorry, LPMUD is currently full.
74
75# No more than 5 users allowed from localhost while working hours :-)
76127.0.0.1:42:5:h8-12,13-18:w1-5:m=Pick a better time.
77
78# Everybody else is welcome.
79*.*.*.*:0:-1:0:0:This message should never be printed.
80
81