File: events.html

package info (click to toggle)
bzflag 2.0.8.20060605
  • links: PTS
  • area: main
  • in suites: etch, etch-m68k
  • size: 29,168 kB
  • ctags: 33,169
  • sloc: cpp: 132,719; ansic: 14,122; sh: 13,441; makefile: 2,330; php: 428; python: 334; perl: 287; objc: 243; xml: 180
file content (1138 lines) | stat: -rw-r--r-- 47,732 bytes parent folder | download
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
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
771
772
773
774
775
776
777
778
779
780
781
782
783
784
785
786
787
788
789
790
791
792
793
794
795
796
797
798
799
800
801
802
803
804
805
806
807
808
809
810
811
812
813
814
815
816
817
818
819
820
821
822
823
824
825
826
827
828
829
830
831
832
833
834
835
836
837
838
839
840
841
842
843
844
845
846
847
848
849
850
851
852
853
854
855
856
857
858
859
860
861
862
863
864
865
866
867
868
869
870
871
872
873
874
875
876
877
878
879
880
881
882
883
884
885
886
887
888
889
890
891
892
893
894
895
896
897
898
899
900
901
902
903
904
905
906
907
908
909
910
911
912
913
914
915
916
917
918
919
920
921
922
923
924
925
926
927
928
929
930
931
932
933
934
935
936
937
938
939
940
941
942
943
944
945
946
947
948
949
950
951
952
953
954
955
956
957
958
959
960
961
962
963
964
965
966
967
968
969
970
971
972
973
974
975
976
977
978
979
980
981
982
983
984
985
986
987
988
989
990
991
992
993
994
995
996
997
998
999
1000
1001
1002
1003
1004
1005
1006
1007
1008
1009
1010
1011
1012
1013
1014
1015
1016
1017
1018
1019
1020
1021
1022
1023
1024
1025
1026
1027
1028
1029
1030
1031
1032
1033
1034
1035
1036
1037
1038
1039
1040
1041
1042
1043
1044
1045
1046
1047
1048
1049
1050
1051
1052
1053
1054
1055
1056
1057
1058
1059
1060
1061
1062
1063
1064
1065
1066
1067
1068
1069
1070
1071
1072
1073
1074
1075
1076
1077
1078
1079
1080
1081
1082
1083
1084
1085
1086
1087
1088
1089
1090
1091
1092
1093
1094
1095
1096
1097
1098
1099
1100
1101
1102
1103
1104
1105
1106
1107
1108
1109
1110
1111
1112
1113
1114
1115
1116
1117
1118
1119
1120
1121
1122
1123
1124
1125
1126
1127
1128
1129
1130
1131
1132
1133
1134
1135
1136
1137
1138
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
	<head>
		<title>BZFS API Documentation: Events</title>
		<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
		<link rel="stylesheet" type="text/css" href="http://www.bzflag.org/general.css">
			<link href="http://www.bzflag.or/favicon.ico" rel="shortcut icon">
				<style type="text/css"> <!-- .Bold { font-size: 16px; font-weight: bold; }
	.style2 {font-size: 36px}
	.SubHeader {font-size: 18px; font-weight: bold; }
	.Code { font-size: 16px; font-style: italic; }
	.Disabled {color: #FFFFFF}
	--></style>
	</head>
	<body>
		<table bgcolor="#dddddd" border="0" cellpadding="0" cellspacing="1" width="100%">
			<tbody>
				<tr height="50" valign="top">
					<td colspan="2">
						<table border="0" cellpadding="0" cellspacing="0" width="100%">
							<tbody>
								<tr>
									<td align="right" bgcolor="#013571"><img src="http://www.bzflag.org/images/logo2-1.jpg" alt="logo"></td>
									<td align="left" bgcolor="#818181"><img src="http://www.bzflag.org/images/logo2-2.jpg" alt=""></td>
								</tr>
							</tbody>
						</table>
					</td>
				</tr>
				<tr valign="top">
					<td>
						<table width="100%">
							<tbody>
								<tr>
									<td align="center" valign="top" width="14%">
										<table align="center" bgcolor="#ffffff" border="1" bordercolor="#000000" width="179">
											<tbody>
												<tr>
													<td align="center"><span class="SubHeader"> Contents </span></td>
												</tr>
												<tr>
													<td align="center">
														<strong>Overview</strong>
													</td>
												</tr>
												<tr>
													<td align="center">
														<a href="index.html">Introduction </a>
													</td>
												</tr>
												<tr>
													<td align="center">
														<a href="general.html">General Info </a>
													</td>
												</tr>
												<tr>
													<td align="center">
														<strong>Reference</strong>
													</td>
												</tr>
												<tr>
													<td align="center">
														<a href="entrys.html">Entries</a>
													</td>
												</tr>
												<tr>
												</tr>
												<tr>
													<td align="center">
														<a href="types.html">Types</a>
													</td>
												</tr>
												<tr>
												</tr>
												<tr>
													<td align="center">
														<a href="events.html">Events</a>
													</td>
												</tr>
												<tr>
												</tr>
												<tr>
													<td align="center">
														<a href="functions.html">Functions</a>
													</td>
												</tr>
												<tr>
												</tr>
												<tr>
													<td align="center">
														<strong>Examples</strong>
													</td>
												</tr>
												<tr>
													<td align="center">
														shockwaveDeath
													</td>
												</tr>
												<tr>
												</tr>
												<tr>
													<td align="center">
														scoreReset
													</td>
												</tr>
												<tr>
												</tr>
											</tbody>
										</table>
									</td>
									<td width="86%">
										<table align="left" bgcolor="#ffffff" border="0" cellpadding="2" cellspacing="2" width="100%">
											<tbody>
												<tr>
													<td valign="top">
														<center><b>BZFS API Documentation</b></center>
													</td>
												</tr>
												<tr>
													<td align="left">
														<p class="Bold style2" align="center">Events</p>
														<p><span class="SubHeader">Registering to Receive
Events</span></p>
														<p>A plugin is basically useless if it can't react to events in game. To allow this 
															a plugin needs to tell bzfs that it would like to listen for events. To do that 
															the plugin will need to call the following function:</p>
														<p class="Code">
															bool bz_registerEvent ( bz_teEventType eventType, bz_EventHandler* eventHandler 
															);</p>
														<p>where
															<span class="Code">eventType</span>
															is one of the following enumerations;</p>
														<table>
															<tbody>
																<tr>
																	<td><span class="Code">bz_eCaptureEvent</span>
																	</td>
																	<td>
																		A team flag is captured in a CTF game</td>
																</tr>
																<tr>
																	<td><span class="Code">bz_ePlayerDieEvent</span>
																	</td>
																	<td>
																		A player gets killed
																	</td>
																</tr>
																<tr>
																	<td><span class="Code">bz_ePlayerSpawnEvent</span>
																	</td>
																	<td>
																		A player joins as a tank</td>
																</tr>
																<tr>
																	<td><span class="Code">bz_eZoneEntryEvent</span>
																	</td>
																	<td>
																		A player enters a zone ( not implemented )
																	</td>
																</tr>
																<tr>
																	<td><span class="Code">bz_eZoneExitEvent</span>
																	</td>
																	<td>
																		A player exits a zone ( not implemented )</td>
																</tr>
																<tr>
																	<td><span class="Code">bz_ePlayerJoinEvent</span>
																	</td>
																	<td>
																		A user joins the server ( player or observer )</td>
																</tr>
																<tr>
																	<td><span class="Code">bz_ePlayerPartEvent</span>
																	</td>
																	<td>
																		A user leaves the server ( player or observer )</td>
																</tr>
																<tr>
																	<td><span class="Code">bz_eChatMessageEvent</span>
																	</td>
																	<td>
																		A chat message is sent
																	</td>
																</tr>
																<tr>
																	<td><span class="Code">bz_eUnknownSlashCommand</span>
																	</td>
																	<td>
																		A "/" command was issued but not handled</td>
																</tr>
																<tr>
																	<td><span class="Code">bz_eGetPlayerSpawnPosEvent</span>
																	</td>
																	<td>
																		The server needs a spawn position for a player</td>
																</tr>
																<tr>
																	<td><span class="Code">bz_eGetAutoTeamEvent</span>
																	</td>
																	<td>
																		The server is assigning a player to a team automatically</td>
																</tr>
																<tr>
																	<td><span class="Code">bz_eAllowPlayer</span></td>
																	<td>
																		The server is about to allow or disallow a player</td>
																</tr>
																<tr>
																	<td>
																		<span class="Code">bz_eTickEvent</span></td>
																	<td>
																		The server has executed one of it's normal event loops
																	</td>
																</tr>
																<tr>
																	<td><span class="Code">bz_eGenerateWorldEvent</span>
																	</td>
																	<td>
																		The server is generating or loading a world</td>
																</tr>
																<tr>
																	<td>
																		<span class="Code">bz_eGetPlayerInfoEvent</span>
																	</td>
																	<td>
																		The server needs the info bits about a player</td>
																</tr>
																<tr>
																	<td><span class="Code">bz_eAllowSpawn</span></td>
																	<td>
																		The server is about to allow a player to spawn</td>
																</tr>
																<tr>
																	<td><span class="Code">bz_eListServerUpdateEvent</span>
																	</td>
																	<td>
																		The game server is about to send a list server update</td>
																</tr>
																<tr>
																	<td><span class="Code">bz_eBanEvent</span>
																	</td>
																	<td>
																		A user was banned</td>
																</tr>
																<tr>
																	<td><span class="Code">bz_eHostBanEvent</span>
																	</td>
																	<td>
																		A user was hostbanned /td>
																</tr>
																<tr>
																	<td><span class="Code">bz_eKickEvent</span>
																	</td>
																	<td>
																		A user was kicked from the server</td>
																</tr>
																<tr>
																	<td><span class="Code">bz_eKillEvent</span>
																	</td>
																	<td>
																		The /kill command was called</td>
																</tr>
																<tr>
																	<td><span class="Code">bz_ePlayerPausedEvent</span>
																	</td>
																	<td>
																		A player has requested a pause</td>
																</tr>
																<tr>
																	<td><span class="Code">bz_eMessagFilteredEvent</span>
																	</td>
																	<td>
																		A chat message was filtered and changed by the chat filter</td>
																</tr>
																<tr>
																	<td><span class="Code">bz_eGameStartEvent</span>
																	</td>
																	<td>
																		A game timer was started</td>
																</tr>
																<tr>
																	<td><span class="Code">bz_eGameEndEvent</span>
																	</td>
																	<td>
																		A game timer ends</td>
																</tr>
																<tr>
																	<td><span class="Code">bz_eSlashCommandEvent</span>
																	</td>
																	<td>
																		A server command was issued</td>
																</tr>
																<tr>
																	<td><span class="Code">bz_ePlayerAuthEvent</span>
																	</td>
																	<td>
																		Player authentication status change</td>
																</tr>
																<tr>
																	<td><span class="Code">bz_eServerMsgEvent</span>
																	</td>
																	<td>
																		A server message was sent</td>
																</tr>
															</tbody>
														</table>
														<p>
															<span class="Code">eventHandler</span>
															is a pointer to a event handler class. Plugins should derive their own versions 
															of the event handler class from bz_EventHandler and pass this pointer into the 
															function. When the event happens the process function of the class will be 
															called so that the plugin can perform any actions it desires.
														</p>
														<p>When the plugin's unload function is called, the plugin must remove any events 
															it has loaded by calling:</p>
														<p>
															<span class="Code">bool bz_removeEvent (
bz_teEventType eventType, bz_EventHandler* eventHandler );</span></p>
														<p>Failure to do so may cause crashes if the plugin is manually unloaded at run 
															time.</p>
														<p><span class="SubHeader">Event Handlers</span></p>
														<p>The event handler is a pure virtual class. It does not perform any logic or 
															actions, but simply provides a framework for a plugin to use. You need to 
															derive your own version of an event handler before you can use it, providing 
															your own code in the "process" method.</p>
														<p class="Code">virtual void process ( bz_EventData *eventData );</p>
														<p>
															When the process method is called, the eventData will be a pointer to a data 
															class. There are a number of different data classes all derived from 
															bz_EventData. The eventType member of the base class will tell you what type 
															the data is. This allows for the same handler to be used for more then one type 
															of event.</p>
														<p>
															The event data for the various event types are as follows, along with their 
															associated data items. Some events may share event data types.</p>
														<table bgcolor="#dddddd" border="1">
															<tbody>
																<tr>
																	<td align="left" valign="top">
																		<table align="left" border="0" cellpadding="2" cellspacing="2">
																			<tbody>
																				<tr>
																					<td><span class="Code">bz_eCaptureEvent</span>
																						provides the following data
																					</td>
																				</tr>
																				<tr>
																					<td><span class="Code">bz_CTFCaptureEventData<br>
{<br>
                              </span>
																						<blockquote class="Code"> bz_eTeamType teamCapped; // the team that had there flag 
																							captured<br>
																							bz_eTeamType teamCapping; // the team that did the capturing<br>
																							int playerCapping; // the player ID who did the capture<br>
																							float pos[3]; // the last known position of the player<br>
																							float rot; // the last known angle of the player<br>
																							double time; // the time in seconds of the capture</blockquote>
																						<p class="Code">}</p>
																					</td>
																				</tr>
																				<tr>
																					<td>Handle this event when you want to do something when ever someone captures a 
																						team flag. It is useful for events like clearing bases, tracking scores, or 
																						playing sounds.
																					</td>
																				</tr>
																			</tbody>
																		</table>
																	</td>
																</tr>
															</tbody>
														</table>
														<br>
														<br>
														<table bgcolor="#dddddd" border="1">
															<tbody>
																<tr>
																	<td valign="top">
																		<table align="left" border="0" cellpadding="2" cellspacing="2">
																			<tbody>
																				<tr>
																					<td><span class="Code">bz_ePlayerDieEvent</span>
																						provides the following data</td>
																				</tr>
																				<tr>
																					<td><span class="Code">bz_PlayerDieEventData<br>
{<br>
                              </span>
																						<blockquote class="Code"> int playerID; // the ID of the player who died<br>
																							bz_eTeamType team; // the team of the player who died<br>
																							int killerID; // the ID of the player doing the killing<br>
																							bz_eTeamType killerTeam; // the team that the killer was on<br>
																							bzApiString flagKilledWith; // the flag the killer had when killing<br>
																							float pos[3]; // the last known position of the victim<br>
																							float rot; // the last known rotation of the victim<br>
																							double time; // the time of the death</blockquote>
																						<p class="Code">}</p>
																					</td>
																				</tr>
																				<tr>
																					<td>This event is called whenever a player is killed.</td>
																				</tr>
																			</tbody>
																		</table>
																	</td>
																</tr>
															</tbody>
														</table>
														<br>
														<br>
														<table bgcolor="#dddddd" border="1">
															<tbody>
																<tr>
																	<td align="left" valign="top">
																		<table border="0" cellpadding="2" cellspacing="2">
																			<tbody>
																				<tr>
																					<td><span class="Code">bz_ePlayerSpawnEvent</span>
																						provides the following data</td>
																				</tr>
																				<tr>
																					<td><span class="Code">bz_PlayerSpawnEventData<br>
{<br>
                              </span>
																						<blockquote class="Code"> int playerID // the ID of the player that has spawned;<br>
																							bz_eTeamType team; // the team the spawning player is a member of<br>
																							float pos[3]; // the position of the spawn<br>
																							float rot; // the rotation of the spawn<br>
																							double time; // the time of the spawn</blockquote>
																						<p class="Code">}</p>
																					</td>
																				</tr>
																				<tr>
																					<td>Track this event when you wish to know if someone has spawned, and where they 
																						have spawned at. This event does not let you set the spawn position, it is only 
																						called AFTER the spawn has been computed and sent to the players.</td>
																				</tr>
																			</tbody>
																		</table>
																	</td>
																</tr>
															</tbody>
														</table>
														<br>
														<br>
														<table bgcolor="#dddddd" border="1">
															<tbody>
																<tr>
																	<td align="left" valign="top">
																		<table border="0" cellpadding="2" cellspacing="2">
																			<tbody>
																				<tr>
																					<td><span class="Code">bz_ePlayerJoinEvent</span>
																						AND
																						<span class="Code">bz_ePlayerPartEvent</span>
																						both provide the following data</td>
																				</tr>
																				<tr>
																					<td><span class="Code">bz_PlayerJoinPartEventData<br>
{<br>
                              </span>
																						<blockquote class="Code"> int playerID; // the ID of the user that has joined or 
																							parted<br>
																							bzApiString globalUser; // if globally identified, global user id<br>
																							bool verified; // whether the player if verified<br>
																							bz_eTeamType team; // the team ID of the user<br>
																							bzApiString callsign; // the callsign used by the user<br>
																							bzApiString email; // the email used by the user<br>
																							bzApiString reason; // if a part event, the reason for the part<br>
																							bzApiString ipAdress; // the IP adress of the player<br>
																							double time; // the time of the event</blockquote>
																						<p class="Code">}</p>
																					</td>
																				</tr>
																				<tr>
																					<td>These events are called when ever a user joins or leaves the server. These 
																						events are called for both players and observers.
																					</td>
																				</tr>
																			</tbody>
																		</table>
																	</td>
																</tr>
															</tbody>
														</table>
														<br>
														<br>
														<table bgcolor="#dddddd" border="1">
															<tbody>
																<tr>
																	<td align="left" valign="top">
																		<table border="0" cellpadding="2" cellspacing="2">
																			<tbody>
																				<tr>
																					<td><span class="Code">bz_eChatMessageEvent</span>
																						provides the following data</td>
																				</tr>
																				<tr>
																					<td><span class="Code">bz_ChatEventData<br>
{<br>
                              </span>
																						<blockquote class="Code"> int from; // the player ID of who the message is from<br>
																							int to; // the player ID of who the message is for<br>
																							bz_eTeamType team; // The team the message is to, if a team message<br>
																							bzApiString message; // the message itself<br>
																							double time; // the time of the message</blockquote>
																						<p class="Code">}</p>
																					</td>
																				</tr>
																				<tr>
																					<td>This event is called whenever the server is asked to deliver a chat message. 
																						This includes private messages, team messages, and general chat. ANYTHING that 
																						is not a / command goes in here. The plugin CAN change the chat message before 
																						it is sent. This can allow for a plugin to filter chat text or insert 
																						additional text. If the plugin clears the message text, then the chat message 
																						will not be sent. The text sent to this plugin may have been filtered by 
																						another plugin first. If the chat is to all players to will be set to the 
																						define BZ_ALLUSERS and the team field will be set to eNoTeam, If the chat is to 
																						the admin channel or a team then the to field will be set to BZ_NULLUSER and 
																						the team will be set to the appropriate team ( admin channel is a fake team )</td>
																				</tr>
																			</tbody>
																		</table>
																	</td>
																</tr>
															</tbody>
														</table>
														<br>
														<br>
														<table bgcolor="#dddddd" border="1">
															<tbody>
																<tr>
																	<td align="left" valign="top">
																		<table border="0" cellpadding="2" cellspacing="2">
																			<tbody>
																				<tr>
																					<td><span class="Code">bz_eUnknownSlashCommand</span>
																						provides the following data</td>
																				</tr>
																				<tr>
																					<td><span class="Code">bz_UnknownSlashCommandEventData<br>
{<br>
                              </span>
																						<blockquote class="Code"> int from; // the ID of the player who sent the command<br>
																							bool handled; // flag that tells if the command was handled.<br>
																							// if the plugin handles this command it must<br>
																							// set this value to true before it returns<br>
																							bzApiString message; // the command itself<br>
																							double time; // the time the command was issued</blockquote>
																						<p class="Code">}</p>
																					</td>
																				</tr>
																				<tr>
																					<td>This event is called when a user attempts to use a / command that does not 
																						exist. It is not very useful for anything other then error reporting. If you 
																						wish to install your own custom / command then it's recommended that you use 
																						the customSlashCommand functions.</td>
																				</tr>
																			</tbody>
																		</table>
																	</td>
																</tr>
															</tbody>
														</table>
														<br>
														<br>
														<table bgcolor="#dddddd" border="1">
															<tbody>
																<tr>
																	<td align="left" valign="top">
																		<table border="0" cellpadding="2" cellspacing="2">
																			<tbody>
																				<tr>
																					<td><span class="Code">bz_eGetPlayerSpawnPosEvent</span>
																						provides the following data</td>
																				</tr>
																				<tr>
																					<td><span class="Code">bz_GetPlayerSpawnPosEventData<br>
{<br>
                              </span>
																						<blockquote class="Code"> int playerID; // the player ID of who needs to be spawned<br>
																							bool handled; // if the action has been/will be handled<br>
																							float pos[3]; // the proposed spawn position<br>
																							float rot; // the proposed spawn rotation<br>
																							double time; // the time of the request</blockquote>
																						<p class="Code">}</p>
																					</td>
																				</tr>
																				<tr>
																					<td>This event is called when ever a player spawn position is needed. The standard 
																						spawn position will be set in the pos and rot fields. The plugin may modify or 
																						set new spawn data if it wishes to. This can allow a plugin to do its own spawn 
																						calculations. The position may have been modified by another plugin first if 
																						multiple plugins are handling the event. If so the "handled" field should be 
																						true. If your plugin modifies the spawn data it too should set the "handled" 
																						bit to true.
																					</td>
																				</tr>
																			</tbody>
																		</table>
																	</td>
																</tr>
															</tbody>
														</table>
														<br>
														<br>
														<table bgcolor="#dddddd" border="1">
															<tbody>
																<tr>
																	<td align="left" valign="top">
																		<table border="0" cellpadding="2" cellspacing="2">
																			<tbody>
																				<tr>
																					<td><span class="Code">bz_eAllowPlayer</span>
																						provides the following data</td>
																				</tr>
																				<tr>
																					<td><span class="Code">bz_AllowPlayerEventData<br>
{<br>
                              </span>
																						<blockquote class="Code"> int playerID; // the player ID of the joining player<br>
																							bzApiString callsign; // the callsign of the player<br>
																							bzApiString ipAddress; // the IP address the player is connecting from<br>
																							bzApiString reason; // a reason string with the reason the player is to be 
																							disallowed to join<br>
																							bool allow; // flag to allow or disallow the player.
																							<br>
																							double time; // the time of the request</blockquote>
																						<p class="Code">}</p>
																					</td>
																				</tr>
																				<tr>
																					<td>This event is called every time a user joins a server. The server will do its 
																						normal ban/disallow logic then pass the value to the plugin in the allow field. 
																						The plugin can then choose to allow or disallow the player as it sees fit. If the 
																						player is to be disallowed, then please provide a reason.
																					</td>
																				</tr>
																			</tbody>
																		</table>
																	</td>
																</tr>
															</tbody>
														</table>
														<br>
														<br>
														<table bgcolor="#dddddd" border="1">
															<tbody>
																<tr>
																	<td align="left" valign="top">
																		<table border="0" cellpadding="2" cellspacing="2">
																			<tbody>
																				<tr>
																					<td><span class="Code">bz_eTickEvent</span>
																						provides the following data</td>
																				</tr>
																				<tr>
																					<td><span class="Code">bz_TickEventData<br>
{<br>
                              </span>
																						<blockquote class="Code"> double time; // time of the event.</blockquote>
																						<p class="Code">}</p>
																					</td>
																				</tr>
																				<tr>
																					<td>This event is not called due to any user or player interaction. This event is 
																						called automatically by bzfs every time it has completed one of its normal 
																						execution loops. This event is useful when plugins need to perform update 
																						actions, periodic maintenance, or other actions that are not directly tied to a 
																						user event, like checking to see if it is time to start a match. A plugin can 
																						set the maximum allowable time between calls to this event using the function 
																						bz_setMaxWaitTime described below.
																					</td>
																				</tr>
																			</tbody>
																		</table>
																	</td>
																</tr>
															</tbody>
														</table>
														<br>
														<br>
														<table bgcolor="#dddddd" border="1">
															<tbody>
																<tr>
																	<td align="left" valign="top">
																		<table border="0" cellpadding="2" cellspacing="2">
																			<tbody>
																				<tr>
																					<td><span class="Code">bz_eGenerateWorldEvent</span>
																						provides the following data</td>
																				</tr>
																				<tr>
																					<td><span class="Code">bz_GenerateWorldEventData <br>
{<br>
                              </span>
																						<blockquote class="Code"> bool handled; // flag to set to true if the plugin has 
																							generated the world<br>
																							bool ctf; // true if the world is a CTF world<br>
																							double time; // the time of the request</blockquote>
																						<p class="Code">}</p>
																					</td>
																				</tr>
																				<tr>
																					<td>This event is called by bzfs when it begins to build or load the world. The 
																						event is called BEFORE any map file is loaded. If the plugin wishes to define 
																						the world, it must call any world creation functions during this event, and 
																						then set the handled flag to true. If the plugin generates the world, then bzfs 
																						will NOT load the map file, and will NOT generate a random world. Calls to any 
																						world creation functions outside this event will fail.</td>
																				</tr>
																			</tbody>
																		</table>
																	</td>
																</tr>
															</tbody>
														</table>
														<br>
														
														<br>
														<table bgcolor="#dddddd" border="1">
															<tbody>
																<tr>
																	<td align="left" valign="top">
																		<table border="0" cellpadding="2" cellspacing="2">
																			<tbody>
																				<tr>
																					<td><span class="Code">bz_eListServerUpdateEvent</span>
																						provides the following data</td>
																				</tr>
																				<tr>
																					<td><span class="Code">bz_ListServerUpdateEvent <br>
{<br>
                              </span>
																						<blockquote class="Code"> bzApiString		address; // the address to be used for the server <br>
bzApiString description; // the description to be used for the server <br>
bzApiString groups; // the groups to be used for the &quot;advertise&quot;
<p> bool handled; // set to true if a plugin has already handled it, set this to true if THIS plugin has handled it <br>
  double time; // the time of the request </p>
																						</blockquote>
																						<p class="Code">}</p>
																					</td>
																				</tr>
																				<tr>
																					<td>This event is called by bzfs when it is about to do a list server update. The plugin can change any of the strings and the modified version will be used before the send. This is most useful for making your server &quot;unlist&quot; when you wish to go into private or match mode. Or for updating the description based on changing data. </td>
																				</tr>
																			</tbody>
																		</table>
																	</td>
																</tr>
															</tbody>
														</table>
														<br>
														
														<br>
														<table bgcolor="#dddddd" border="1">
															<tbody>
																<tr>
																	<td align="left" valign="top">
																		<table border="0" cellpadding="2" cellspacing="2">
																			<tbody>
																				<tr>
																					<td><span class="Code">bz_eBanEvent</span>
																						provides the following data</td>
																				</tr>
																				<tr>
																					<td><span class="Code">bz_BanEventData <br>
{<br>
                              </span>
																						<blockquote class="Code"> int bannerID; // the ID of the player doing the ban <br>
int banneeID; // the ID of the player who is about to be banned <br>
int duration; // the duration of the ban ( in seconds ) <br>
bzApiString ipAddress; // the banned users IP address or range <br>
bzApiString reason; // the reason given for the ban </blockquote>
																						<p class="Code">}</p>
																					</td>
																				</tr>
																				<tr>
																					<td>This event is called by bzfs when an admin bans a user. </td>
																				</tr>
																			</tbody>
																		</table>
																	</td>
																</tr>
															</tbody>
														</table>
														<br>
														
														<br>
														<table bgcolor="#dddddd" border="1">
															<tbody>
																<tr>
																	<td align="left" valign="top">
																		<table border="0" cellpadding="2" cellspacing="2">
																			<tbody>
																				<tr>
																					<td><span class="Code">bz_eHostBanEvent</span>
																						provides the following data</td>
																				</tr>
																				<tr>
																					<td><span class="Code">bz_HostBanEventData <br>
{<br>
                              </span>
																						<blockquote class="Code"> int bannerID; // the person doing the ban <br>
int duration; // the duration of the ban <br>
bzApiString hostPattern; // the mask that was banned <br>
bzApiString reason; // the reason given for the ban </blockquote>
																						<p class="Code">}</p>
																					</td>
																				</tr>
																				<tr>
																					<td>This event is called by bzfs when an admin hostbans a user. </td>
																				</tr>
																			</tbody>
																		</table>
																	</td>
																</tr>
															</tbody>
														</table>
														<br>
														
														<br>
														<table bgcolor="#dddddd" border="1">
															<tbody>
																<tr>
																	<td align="left" valign="top">
																		<table border="0" cellpadding="2" cellspacing="2">
																			<tbody>
																				<tr>
																					<td><span class="Code">bz_eKickEvent</span>
																						provides the following data</td>
																				</tr>
																				<tr>
																					<td><span class="Code">bz_KickEventData <br>
{<br>
                              </span>
																						<blockquote class="Code"> int kickerID; // the person doing the kick <br>
int kickedID; // the person being kicked <br>
bzApiString reason; // the reason given for the kick</blockquote>
																						<p class="Code">}</p>
																					</td>
																				</tr>
																				<tr>
																					<td>This event is called by bzfs when an admin kicks a user from the server. </td>
																				</tr>
																			</tbody>
																		</table>
																	</td>
																</tr>
															</tbody>
														</table>
														<br>
														
														<br>
														<table bgcolor="#dddddd" border="1">
															<tbody>
																<tr>
																	<td align="left" valign="top">
																		<table border="0" cellpadding="2" cellspacing="2">
																			<tbody>
																				<tr>
																					<td><span class="Code">bz_eKillEvent</span>
																						provides the following data</td>
																				</tr>
																				<tr>
																					<td><span class="Code">bz_KillEventData <br>
{<br>
                              </span>
																						<blockquote class="Code"> int killerID; // the person doing the kill command <br>
int killedID; // the person being killed <br>
bzApiString reason; // the reason given for the kill </blockquote>
																						<p class="Code">}</p>
																					</td>
																				</tr>
																				<tr>
																					<td>This event is called by bzfs when an admin uses the /kill command. </td>
																				</tr>
																			</tbody>
																		</table>
																	</td>
																</tr>
															</tbody>
														</table>
														<br>
														
														
														<br>
														<table bgcolor="#dddddd" border="1">
															<tbody>
																<tr>
																	<td align="left" valign="top">
																		<table border="0" cellpadding="2" cellspacing="2">
																			<tbody>
																				<tr>
																					<td><span class="Code">bz_ePlayerPausedEvent</span>
																						provides the following data</td>
																				</tr>
																				<tr>
																					<td><span class="Code">bz_PlayerPausedEventData <br>
{<br>
                              </span>
																						<blockquote class="Code"> int player; // the player pausing<br>
double time; // the time of the event </blockquote>
																						<p class="Code">}</p>
																					</td>
																				</tr>
																				<tr>
																					<td>This event is called when a user uses the pause function on the client and notifies the server </td>
																				</tr>
																			</tbody>
																		</table>
																	</td>
																</tr>
															</tbody>
														</table>
														<br>
														
														
														<br>
														<table bgcolor="#dddddd" border="1">
															<tbody>
																<tr>
																	<td align="left" valign="top">
																		<table border="0" cellpadding="2" cellspacing="2">
																			<tbody>
																				<tr>
																					<td><span class="Code">bz_eMessagFilteredEvent</span>
																						provides the following data</td>
																				</tr>
																				<tr>
																					<td><span class="Code">bz_MessageFilteredEventData <br>
{<br>
                              </span>
																						<blockquote class="Code"> int player; // the player who sent the message <br>
double time; // the time the message was sent <br>
<br>
bzApiString rawMessage; // the unfiltered message <br>
bzApiString filteredMessage; // the filtered message </blockquote>
																						<p class="Code">}</p>
																					</td>
																				</tr>
																				<tr>
																					<td>This event is called when a user sends a chat message that gets changed in the chat filter.</td>
																				</tr>
																			</tbody>
																		</table>
																	</td>
																</tr>
															</tbody>
														</table>
														<br>
														
														
														<br>
														<table bgcolor="#dddddd" border="1">
															<tbody>
																<tr>
																	<td align="left" valign="top">
																		<table border="0" cellpadding="2" cellspacing="2">
																			<tbody>
																				<tr>
																					<td><span class="Code">bz_eGameStartEvent AND bz_eGameEndEvent</span>
																						provide the following data</td>
																				</tr>
																				<tr>
																					<td><span class="Code">bz_GameStartEndEventData <br>
{<br>
                              </span>
																						<blockquote class="Code"> double time; // the time that the game was started/ended<br>
double duration; // the duration of the game timer <br> </blockquote>
																						<p class="Code">}</p>
																					</td>
																				</tr>
																				<tr>
																					<td>These events are called when a game timer starts or ends.</td>
																				</tr>
																			</tbody>
																		</table>
																	</td>
																</tr>
															</tbody>
														</table>
														<br>
														<br>
														<table bgcolor="#dddddd" border="1">
															<tbody>
																<tr>
																	<td align="left" valign="top">
																		<table border="0" cellpadding="2" cellspacing="2">
																			<tbody>
																				<tr>
																					<td><span class="Code">bz_eSlashCommandEvent</span>
																						provides the following data</td>
																				</tr>
																				<tr>
																					<td><span class="Code">bz_SlashCommandEventData<br>
{<br>
                              </span>
																						<blockquote class="Code"> int from; // the ID of the player who sent the command<br>
																							bzApiString message; // the command itself<br>
																							double time; // the time the command was issued</blockquote>
																						<p class="Code">}</p>
																					</td>
																				</tr>
																				<tr>
																					<td>This event is called for any user entered server command.  The command text is unprocessed and not checked as a valid command when this event occurs.</td>
																				</tr>
																			</tbody>
																		</table>
																	</td>
																</tr>
															</tbody>
														</table>
														<br>
														<br>
														<table bgcolor="#dddddd" border="1">
															<tbody>
																<tr>
																	<td align="left" valign="top">
																		<table border="0" cellpadding="2" cellspacing="2">
																			<tbody>
																				<tr>
																					<td><span class="Code">bz_ePlayerAuthEvent</span>
																						provides the following data</td>
																				</tr>
																				<tr>
																					<td><span class="Code">bz_PlayerAuthEventData<br>
{<br>
                              </span>
																						<blockquote class="Code"> int playerID; // the ID of the player whose authentication status changed</blockquote>
																						<p class="Code">}</p>
																					</td>
																				</tr>
																				<tr>
																					<td>This event is called when a player manually identifies to the server or issues the server password.</td>
																				</tr>
																			</tbody>
																		</table>
																	</td>
																</tr>
															</tbody>
														</table>
														<br>
														<br>
														<table bgcolor="#dddddd" border="1">
															<tbody>
																<tr>
																	<td align="left" valign="top">
																		<table border="0" cellpadding="2" cellspacing="2">
																			<tbody>
																				<tr>
																					<td><span class="Code">bz_eServerMsgEvent</span>
																						provides the following data</td>
																				</tr>
																				<tr>
																					<td><span class="Code">bz_ServerMsgEventData<br>
{<br>
                              </span>
																						<blockquote class="Code"> int to; // the player ID the message is sent to<br>
																							bz_eTeamType team; // The team the message is to, if a team message<br>
																							bzApiString message; // the text of the message<br>
																							double time; // the time of the message</blockquote>
																						<p class="Code">}</p>
																					</td>
																				</tr>
																				<tr>
																					<td>This event is called whenever the server issues a message.  
																						The message can be to a specific player, team, or a general broadcast.
																						If the server message is to all players to will be set to the 
																						define BZ_ALLUSERS and the team field will be set to eNoTeam, If the server message is to 
																						the admin channel or a team then the to field will be set to BZ_NULLUSER and 
																						the team will be set to the appropriate team ( admin channel is a fake team )
																						The plugin cannot change the contents of the message.  
																						This event is mainly useful for logging.</td>
																				</tr>
																			</tbody>
																		</table>
																	</td>
																</tr>
															</tbody>
														</table>
														<br>
													</td>
												</tr>
												<tr>
													<td>
														<div align="left"><a href="types.html">Previous</a></div>
														<div align="right"><a href="functions.html">Next</a></div>
													</td>
												</tr>
											</tbody>
										</table>
									</td>
								</tr>
							</tbody>
						</table>
					</td>
				</tr>
				<tr valign="bottom">
					<td cellpadding="2" bgcolor="#000000">
						<table bgcolor="#ffffff" border="0" cellpadding="2" width="100%">
							<tbody>
								<tr>
									<td align="right">
										<span class="copyright">copyright
 <a href="http://www.bzflag.org/wiki/CurrentMaintainer">CurrentMaintainer</a>
1993-2006&nbsp;</span>
									</td>
								</tr>
								<tr>
									<td>
										<table bgcolor="#ffffff" border="0" cellpadding="2" width="100%">
											<tbody>
												<tr>
													<td align="center">
														<a href="http://www.opengl.org/"><img src="http://www.bzflag.org//images/opengl.gif" alt="opengl" border="0" height="31"
																width="88"></a> <a href="http://sourceforge.net/project/?group_id=3248"><img src="http://sourceforge.net/sflogo.php?group_id=3248&amp;type=1" alt="sourceforge"
																border="0" height="31" width="88"></a> <a href="http://sourceforge.net/donate/index.php?group_id=3248">
															<img src="http://images.sourceforge.net/images/project-support.jpg" alt="Support This Project"
																border="0" height="32" width="88"> </a><a href="http://www.linuxgames.com/">
															<img src="http://www.bzflag.org/images/linuxgames.gif" alt="linuxgames" border="0" height="31"
																width="88"></a> <a href="http://www.telefragged.com/"><img src="http://www.bzflag.org//images/telefragged.gif" alt="telefragged" border="0"
																height="31" width="88"></a>
													</td>
												</tr>
											</tbody>
										</table>
									</td>
								</tr>
							</tbody>
						</table>
					</td>
				</tr>
			</tbody>
		</table>
	</body>
</html>