-
Notifications
You must be signed in to change notification settings - Fork 0
/
config.xsd
202 lines (183 loc) · 7.9 KB
/
config.xsd
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
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
<?xml version="1.0" encoding="UTF-8"?>
<xs:schema attributeFormDefault="unqualified" elementFormDefault="qualified" xmlns:xs="http://www.w3.org/2001/XMLSchema"
version="1.1">
<xs:element name="bot" type="botType"/>
<xs:complexType name="gameType">
<xs:sequence>
<xs:element type="xs:string" name="binary"/>
<xs:element type="xs:string" name="working_dir" minOccurs="0"/>
<xs:element type="xs:string" name="args" minOccurs="0"/>
<xs:element type="xs:string" name="environment" minOccurs="0" maxOccurs="unbounded"/>
<xs:element name="status_channels">
<xs:complexType>
<xs:all>
<xs:element type="xs:string" name="admin"/>
<xs:element type="xs:string" name="msg"/>
</xs:all>
</xs:complexType>
</xs:element>
<xs:element name="pre_roll" minOccurs="0">
<xs:complexType>
<xs:all>
<xs:element type="xs:string" name="regexp"/>
<xs:element type="xs:string" name="replace"/>
</xs:all>
</xs:complexType>
</xs:element>
<xs:element name="chat">
<xs:complexType>
<xs:all>
<xs:element type="xs:string" name="bridged_channel" minOccurs="0" maxOccurs="unbounded"/>
<xs:element name="formats">
<xs:complexType>
<xs:sequence>
<xs:element type="xs:string" name="message" minOccurs="0"/>
<xs:element type="xs:string" name="join" minOccurs="0"/>
<xs:element type="xs:string" name="part" minOccurs="0"/>
<xs:element type="xs:string" name="nick" minOccurs="0"/>
<xs:element type="xs:string" name="quit" minOccurs="0"/>
<xs:element type="xs:string" name="kick" minOccurs="0"/>
<xs:element type="xs:string" name="external" minOccurs="0"/>
<xs:element name="extra" minOccurs="0" maxOccurs="unbounded">
<xs:complexType>
<xs:simpleContent>
<xs:extension base="xs:string">
<xs:attribute type="xs:string" name="name"/>
</xs:extension>
</xs:simpleContent>
</xs:complexType>
</xs:element>
</xs:sequence>
</xs:complexType>
</xs:element>
<xs:element name="transformer" type="transformerConfigType" minOccurs="0"/>
</xs:all>
<xs:attribute type="xs:boolean" name="dont_bridge"/>
<xs:attribute type="xs:boolean" name="dont_allow_forwards"/>
<xs:attribute type="xs:boolean" name="dump_stdout"/>
<xs:attribute type="xs:boolean" name="dump_stderr"/>
</xs:complexType>
</xs:element>
<xs:element name="command" minOccurs="0" maxOccurs="unbounded">
<xs:complexType>
<xs:all>
<xs:element type="xs:string" name="format"/>
<xs:element type="xs:string" name="help"/>
</xs:all>
<xs:attribute type="xs:string" name="name"/>
<xs:attribute type="xs:positiveInteger" name="requires_admin"/>
</xs:complexType>
</xs:element>
<xs:element name="stdio_regexp" minOccurs="0" maxOccurs="unbounded">
<xs:complexType>
<xs:sequence>
<xs:element type="xs:string" name="regexp"/>
<xs:element type="xs:string" name="format"/>
</xs:sequence>
<xs:attribute type="xs:string" name="name"/>
<xs:attribute type="xs:integer" name="priority"/>
<xs:attribute type="xs:boolean" name="dont_eat"/>
<xs:attribute type="xs:boolean" name="dont_send_to_chan"/>
<xs:attribute type="xs:boolean" name="dont_forward"/>
<xs:attribute type="xs:boolean" name="send_to_local"/>
</xs:complexType>
</xs:element>
</xs:sequence>
<xs:attribute type="xs:string" name="name" use="required"/>
<xs:attribute type="xs:string" name="auto_start"/>
<xs:attribute type="xs:string" name="auto_restart"/>
<xs:attribute type="xs:boolean" name="dont_copy_env"/>
</xs:complexType>
<xs:complexType name="game_managerType">
<xs:sequence>
<xs:element name="strip_mask" minOccurs="0" maxOccurs="unbounded">
<xs:complexType>
<xs:attribute type="xs:string" name="mask"/>
</xs:complexType>
</xs:element>
<xs:element type="gameType" name="game" maxOccurs="unbounded"/>
</xs:sequence>
</xs:complexType>
<!-- Transformer Configs -->
<xs:complexType name="transformerConfigType" abstract="true">
<xs:attribute name="type" type="xs:string"/>
</xs:complexType>
<!-- strip transformer -->
<xs:complexType name="strip_transformer">
<xs:complexContent>
<xs:extension base="transformerConfigType"/>
</xs:complexContent>
</xs:complexType>
<!-- simple transformer -->
<xs:complexType name="simple_transformer">
<xs:complexContent>
<xs:extension base="transformerConfigType">
<xs:all>
<xs:element name="replace_map">
<xs:complexType>
<xs:all>
<xs:element name="bold" type="xs:string"/>
<xs:element name="italic" type="xs:string"/>
<xs:element name="underline" type="xs:string"/>
<xs:element name="strikethrough" type="xs:string"/>
<xs:element name="reset" type="xs:string"/>
</xs:all>
</xs:complexType>
</xs:element>
<xs:element name="colour_map">
<xs:complexType>
<xs:sequence>
<xs:element name="colour" maxOccurs="unbounded" minOccurs="0">
<xs:complexType mixed="true">
<xs:attribute name="r" type="xs:nonNegativeInteger" default="0"/>
<xs:attribute name="g" type="xs:nonNegativeInteger" default="0"/>
<xs:attribute name="b" type="xs:nonNegativeInteger" default="0"/>
</xs:complexType>
</xs:element>
</xs:sequence>
</xs:complexType>
</xs:element>
<xs:element name="all_colour" type="xs:string" minOccurs="0"/>
</xs:all>
</xs:extension>
</xs:complexContent>
</xs:complexType>
<!-- Connection configs-->
<xs:complexType name="connConfigType" abstract="true">
<xs:attribute name="conn_type" type="xs:string"/>
</xs:complexType>
<!-- IRC configs-->
<xs:complexType name="irc_config">
<xs:complexContent>
<xs:extension base="connConfigType">
<xs:all>
<xs:element type="xs:string" name="nick"/>
<xs:element type="xs:string" name="ident"/>
<xs:element type="xs:string" name="gecos"/>
<xs:element type="xs:string" name="host"/>
<xs:element type="xs:nonNegativeInteger" name="port"/>
<xs:element name="admin" maxOccurs="unbounded">
<xs:complexType>
<xs:attribute type="xs:string" name="mask"/>
<xs:attribute type="xs:nonNegativeInteger" name="level"/>
</xs:complexType>
</xs:element>
<xs:element type="xs:string" name="admin_channel" maxOccurs="unbounded"/>
<xs:element type="xs:boolean" name="authenticate"/>
<xs:element type="xs:boolean" name="use_sasl"/>
<xs:element type="xs:string" name="auth_user"/>
<xs:element type="xs:string" name="auth_password"/>
</xs:all>
<xs:attribute type="xs:boolean" name="ssl" use="required"/>
<xs:attribute type="xs:string" name="dont_verify_certs"/>
<xs:attribute name="command_prefix" type="xs:string" use="required"/>
</xs:extension>
</xs:complexContent>
</xs:complexType>
<xs:complexType name="botType">
<xs:all>
<xs:element type="game_managerType" name="games"/>
<xs:element type="connConfigType" name="conn_config"/>
</xs:all>
</xs:complexType>
</xs:schema>