File: functions.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 (577 lines) | stat: -rw-r--r-- 32,144 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
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
	<head>
		<title>BZFS API Documentation: Introduction</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"> <!-- .style1 { font-size: 16px; font-weight: bold; }
	.style2 {font-size: 36px}
	.style4 {font-size: 18px; font-weight: bold; }
	.style5 {color: #999999}
	.Code { font-size: 16px; font-style: italic; }
	.style6 {font-weight: bold}
	.style7 {font-size: 24px}
	.style8 {color: #333333}
	.style9 {color: #CCCCCC}
	.style10 { color: #FF0000; font-weight: bold; }
	--></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="style4"> 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" class="style6">
														<center>BZFS API Documentation</center>
													</td>
												</tr>
												<tr>
													<td align="left">
														<p class="style1 style2" align="center">Calling BZFS Functions</p>
														<p>Once you have your event in place, you need to do something with all this data. 
															To handle this the API provides a number of functions that can be called 
															directly. These functions will perform actions and return data about the 
															current game state.</p>
														<p>&nbsp;</p>
														<p>The functions are as follows:</p>
														<p><span class="style4 style7">Player Data Functions </span></p>
														<p><strong>BZF_API bz_PlayerRecord *playerRecord bz_getPlayerByIndex ( int index );</strong></p>
														<p>This function will take a player index, and will return a new player data object 
															in the playerRecord parameter. <b>WARNING:</b> this function CAN and WILL 
															return NULL in certain situations. <b>Always</b> check for NULL before 
															dereferencing the result of this function, otherwise your plugin may crash the 
															server. The player data class contains the following data:</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_PlayerRecord<br>
                {<br>
                                  </span>
																						<blockquote class="Code">
																							<p>
																								int playerID; // id of the player<br>
																								bzApiString callsign; // callsign the player is using<br>
																								bzApiString email; // email address of the player
																								<br>
																								bz_eTeamType team; // team the player is on<br>
																								float pos[3]; // last known position<br>
																								float rot; // last known heading<br>
																								bzApiString ipAddress; // the network address for this connection<br>
																								bzApiString currentFlag; // the flag the user presently has<br>
																								bzApiStrList flagHistory; // a list of all flags the user has had<br>
																								bool spawned; // true if the user is in game as a tank<br>
																								bool verified; // true if the user has been authenticated ether global or local<br>
																								bool globalUser; // true if the user was verified from the global login system<br>
																								bool admin; // true if the user is an admin ( has the @ in his name, aka has ban perm)<br>
																								bool op; // true if the user is an server operator ( has given the server /password)<br>
																							    bzApiStrList groups; // a list of all the groups the user is a member of<br>
																							    int lag; // the lag value of the user in ms<br>
																							    int wins; // number of times this player has killed another<br>
																							    int losses; // number of times this player has died<br>
																							    int teamKills; // number of times the user has killed a teammate<br>
																						  </p>
																					  </blockquote>
																						<p class="Code">}</p>
																					</td>
																				</tr>
																				<tr>
																					<td>&nbsp;</td>
																				</tr>
																			</tbody>
																		</table>
																	</td>
																</tr>
															</tbody>
														</table>
														<p><span class="style6">bz_PlayerRecord</span>
															also contains the following methods, for ease of use. They just call the 
															existing player functions described below</p>
														<p><strong>void update ( void );</strong><br>
															Calls <strong>bz_updatePlayerData</strong> on this player.
														</p>
														<p><strong>bool hasPerm ( const char* perm );</strong><br>
															Calls <strong>bz_hasPerm</strong> on this player.
														</p>
														<p><strong>bool grantPerm ( const char* perm );</strong><br>
															Calls <strong>bz_grantPerm</strong> on this player.
														</p>
														<p><strong>bool revokePerm ( const char* perm );</strong><br>
															Calls <strong>bz_revokePerm</strong> on this player.
														</p>
														<p><strong>BZF_API bool bz_updatePlayerData ( bz_PlayerRecord *playerRecord );</strong><br>
															Updates a playerRecord to its current data. This is the same as calling update 
															on the bz_PlayerRecord class.</p>
														<p><strong>BZF_API bool bz_getPlayerIndexList ( std::vector&lt;int&gt; *playerList )</strong>;<br>
															Fills out the supplied list with a list of the IDs of all known users.</p>
														<p><strong>BZF_API bool bz_freePlayerRecord ( bz_PlayerRecord *playerRecord );</strong><br>
															This command will free the memory used by a Player Record Object. It must be 
															called when a plug-in is done using the player data returned from <strong>bz_getPlayerByIndex</strong></p>
														<p class="style10">The following score functions were removed until they can work 
															properly on all clients.</p>
														<p><span class="style8"><span class="style9"><strong>BZF_API bool bz_setPlayerWins (int 
																		playerId, int wins);</strong><br> 
                      This command will set the number of wins (kills) in the score for the specified player, and update all client scores. </span>
															</span></p>
														<p class="style9"><strong>BZF_API bool bz_setPlayerLosses (int playerId, int losses);</strong><br>
															This command will set the number of losses(deaths) in the score for the 
															specified player, and update all client scores.
														</p>
														<p class="style9"><strong>BZF_API bool bz_setPlayerTKs(int playerId, int tks);</strong><br>
															This command will set the number of TKs (teamkills) in the score for the 
															specified player, and update all client scores.
														</p>
														<p class="style9"><strong>BZF_API bool bz_resetPlayerScore(int playerId);</strong><br>
															This command will reset to zero the score and TKs of the specified player and 
															update all clients.</p>
														<p><strong>Permission functions </strong>
															<br>
															The permission functions all take permission names as input. These names are 
															the same as the server uses in its users and groups files. All the standard 
															permission names have been defined in the bzfsAPI.h file using the <strong>bz_perm_XXXXXXXX
															</strong>set of defines. Groups can have custom permissions, so if you want to 
															use a non standard permission in your plugin, you can also use that name in the 
															"hasPerm" function. Custom permissions can only be read via the API, they can 
															not be set. So the user will have to know to enter the permission name into 
															his/her groups file.</p>
														<p><strong>BZF_API bool bz_hasPerm ( int playerID, const char* perm );</strong><br>
															This function will return true if the user has the permission named in the perm 
															parameter
														</p>
														<p><strong>BZF_API bool bz_grantPerm ( int playerID, const char* perm );</strong><br>
															This function will give the user the specified permission, and return true if 
															the operation was successful.</p>
														<p><strong>BZF_API bool bz_revokePerm ( int playerID, const char* perm );</strong><br>
															This function will remove the specified permission from the user, and return 
															true if the operation was successful.</p>
														<P><SPAN class="style4 style7">Group&nbsp;Functions 
</SPAN></P>
														<P><STRONG>BZF_API bzAPIStringList* bz_getGroupList ( void );</STRONG><BR>
															This function will return a new string list that contains the all known group 
															names in the bzfs group database. Be sure to use <STRONG>bz_deleteStringList </STRONG>
															to free the list when you are done with the list.</P>
														<P><STRONG>BZF_API&nbsp; bzAPIStringList* bz_getGroupPerms ( const char* group);</STRONG><BR>
															Returns a new string list that contains the permission names that the specified 
															group has rights to. Be sure to use <STRONG>bz_deleteStringList </STRONG>to 
															free the list when you are done with the list.</P>
														<P><STRONG>BZF_API&nbsp; bool bz_groupAllowPerm ( const char* group, const char* perm);</STRONG><BR>
															Returns true if the specified group will allow the specified permission.</P>
														<p><span class="style4 style7">Message Functions </span></p>
														<p><strong>BZF_API bool bz_sendTextMessage (int from, int to, const char* message);</strong><br>
															Sends a text message to the specified user. <strong>BZ_SERVER</strong> should 
															be used for messages from the server. If the message is sent to <strong>BZ_ALL_USERS</strong>
															it will send the message to all connected users. Likewise if it is set to <strong>BZ_ADMIN_CHANNEL</strong>
															it will be sent to all users with the ADMINMESSAGERECEIVE permission.</p>
														<p><strong>BZF_API bool bz_sendTextMessage (int from, bz_eTeamType to, const char* message);</strong><br>
															Sends a text message to the specified team. <strong>BZ_SERVER</strong> should 
															be used for messages from the server.</p>
														<p><strong>BZF_API bool bz_sendTextMessagef (int from, bz_eTeamType|int to, const char* fmt, ...);</strong><br>
															Same as the bz_sendTextMessage counterparts, but uses printf-style formatting.</p>
														<p><strong>BZF_API bool bz_sentFetchResMessage ( int playerID, const char* URL );</strong><br>
															Sends an update message to the specified player telling them they must have the 
															file specified in the URL. At present this is only used for sounds files.
														</p>
														<p>&nbsp;</p>
														<p><span class="style4 style7">World Weapons Functions </span></p>
														<p><strong>BZF_API bool bz_fireWorldWep ( bzApiString flagType, float lifetime, int 
																fromPlayer, float *pos, float tilt, float direction, int shotID, float dt )</strong><br>
															Adds a shot of the specified type and with the specified parameters to the 
															world. <strong>BZ_SERVER</strong> should be used as the fromPlayer for normal 
															world weapons.</p>
														<p>&nbsp;</p>
														<p class="style4 style7">Time Functions
														</p>
														<p><strong>BZF_API double bz_getCurrentTime ( void );</strong><br>
															Returns the current server time in seconds ( time server has been alive ).</p>
														<p><strong>BZF_API float bz_getMaxWaitTime ( void );</strong><br>
															Returns the maximum amount of time in seconds between <strong>bz_eTickEvent</strong>
															events
														</p>
														<p><strong>BZF_API void bz_setMaxWaitTime ( float time );</strong><br>
															Sets the maximum amount of time in seconds between <strong>bz_eTickEvent</strong>
															events. If another plugin or the base system has a lower maximum the lowest max 
															will be used.
														</p>
														<p><strong>BZF_API void bz_getLocaltime ( bz_localTime *ts );</strong><br>
															Returns the real world time on the OS of the server into the passed in <strong>bz_localTime</strong>
															structure, witch contains</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">typedef struct <br>
                {<br>
                                  </span>
																						<blockquote class="Code"> int year;<br>
																							int month;<br>
																							int day;<br>
																							int hour;<br>
																							int minute;<br>
																							int second;<br>
																							bool daylightSavings;</blockquote>
																						<p class="Code">}bz_localTime;</p>
																					</td>
																				</tr>
																			</tbody>
																		</table>
																	</td>
																</tr>
															</tbody>
														</table>
														<p>
														</p>
														<p><span class="style4 style7">BZDB Functions </span></p>
														<p><strong>BZF_API double bz_getBZDBDouble ( const char* variable );</strong><br>
															Queries the BZDB database for the specified value and returns it as a double</p>
														<p><strong>BZF_API bzApiString bz_getBZDBString( const char* variable );</strong><br>
															Queries the BZDB database for the specified value and returns it as a string</p>
														<p><strong>BZF_API bool bz_getBZDBBool( const char* variable );</strong><br>
															Queries the BZDB database for the specified value and returns it as a boolean 
															(true if value is non zero)</p>
														<p><strong>BZF_API int bz_getBZDBInt( const char* variable );</strong><br>
															Queries the BZDB database for the specified value and returns it as an integer</p>
														<p><strong>BZF_API bool bz_setBZDBDouble ( const char* variable, double val );</strong><br>
															Sets the BZDB database item specified to the for the specified floating point 
															value</p>
														<p><strong>BZF_API bool bz_setBZDBString( const char* variable, const char *val );</strong><br>
															Sets the BZDB database item specified to the for the specified string value</p>
														<p><strong>BZF_API bool bz_setBZDBBool( const char* variable, bool val );</strong><br>
															Sets the BZDB database item specified to the for the specified boolean value</p>
														<p><strong>BZF_API bool bz_setBZDBInt( const char* variable, int val );</strong><br>
															Sets the BZDB database item specified to the for the specified integer value</p>
														<p>&nbsp;</p>
														<p><span class="style4 style7">Logging Functions </span></p>
														<p><strong>BZF_API void bz_debugMessage ( int debugLevel, const char* message );</strong><br>
															Outputs the specified message if the current debug level is at least the 
															specified level.</p>
														<p><strong>BZF_API void bz_debugMessagef ( int debugLevel, const char* fmt, ... );</strong><br>
															Smae as above, but use printf-style formatting.</p>
														<p><strong>BZF_API int bz_getDebugLevel ( void );</strong><br>
															Returns BZFS' current debug level. You can use this for more complicated debug 
															calculations or output.</p>
														<p>&nbsp;</p>
														<p><span class="style4 style7">Player Admin  Functions </span></p>
														<p><strong>BZF_API bool bz_kickUser ( int playerIndex, const char* reason, bool notify 
																);</strong><br>
															Removes the specified user from the server. If notify is true, the user and 
															administrators will be notified using the reason.
														</p>
														<p><strong>BZF_API bool bz_IPBanUser ( int playerIndex, const char* ip, int time, const 
																char* reason )</strong><br>
															Adds an entry to the main banlist with the specified data.</p>
														<p><strong>BZF_API bool bz_IPUnbanUser ( const char* ip );</strong><br>
															Removes an entry to the main banlist with the specified IP address.</p>
														<p><strong>BZF_API bool bz_killPlayer ( int playerID, bool spawnOnBase );</strong><br>
															Kills the specified player. If spawnOnBase is true, then the user will respawn 
															back at his CTF base.</p>
														<p><strong>BZF_API std::vector&lt;std::string&gt; bz_getReports( void );</strong><br>
															Returns a vector of strings containing the raw contents of the reports. Only works when 
                              reports are output to a file, not to a report pipe.</p>
														<p>&nbsp;</p>
														<p><span class="style4 style7">Lagwarn Functions </span></p>
														<p><strong>BZF_API int bz_getLagWarn( void );</strong><br>
															Returns the current lagwarn value in ms.
														</p>
														<p><strong>BZF_API bool bz_setLagWarn( int lagwarn );</strong><br>
															Sets a new lagwarn value in ms.
                            </p>
														<p>&nbsp;</p>
														<p><span class="style4 style7">Poll Functions </span></p>
														<p><strong>BZF_API bool bz_pollVeto ( void );</strong><br>
															Cancels any currently running poll.
														</p>
														<p>&nbsp;</p>
														<p><span class="style4 style7">Help Functions </span></p>
														<p><strong>BZF_API const std::vector<std::string> *bz_getHelpTopic( std::string name );</strong><br>
															Returns a list of help topics.
														</p>
														<p><strong>BZF_API const std::vector&lt;std::string&gt; &bz_getHelpTopic( std::string name );</strong><br>
															Returns the contents of a help topic
                            </p>
														<p>&nbsp;</p>
														<p><span class="style4 style7">Spawn Functions </span></p>
														<p><strong>BZF_API bool bz_getStandardSpawn ( int playeID, float pos[3], float *rot );</strong><br>
															Returns a normally calculated spawn position for the specified user.</p>
														<p>&nbsp;</p>
														<p><span class="style4 style7">Flag Functions </span></p>
														<p><strong>BZF_API bool bz_removePlayerFlag ( int playeID );</strong><br>
															Removes (zaps) the flag carried by the specified player
														</p>
														<p><strong>BZF_API void bz_resetFlags ( bool onlyUnused );</strong><br>
															Removes (zaps) all flags on the map, exactly the same as the /flag reset 
															command</p>
														<p>&nbsp;</p>
														<p><span class="style4 style7">Server Info  Functions </span></p>
														<p><strong>BZF_API bool bz_getPublic( void );</strong><br>
															Returns true if the server is public
														</p>
														<p><strong>BZF_API bzApiString bz_getPublicAddr( void );</strong><br>
															Returns the public address the server is using, will return an empty string if 
															the server is not public
														</p>
														<p><strong>BZF_API bzApiString bz_getPublicDescription( void );</strong><br>
															Returns the public description the server is using, will return an empty string 
															if the server is not public
														</p>
														<p><strong>BZF_API void bz_updateListServer ( void );</strong><br>
															Forces the server to do a list server update.
														</p>
														<p>&nbsp;</p>
														<p><span class="style4 style7">Server Game functions </span></p>                  
														  <p><strong>BZ_API void bz_shutdown();</strong><br>
													  		This command will terminate BZFS.</p>
														  <p><strong>BZ_API void bz_superkill();</strong><br>
													  		This command will perform a superkill; disconnecting all players.</p>
														  <p><strong>BZ_API void bz_gameOver(int playerIndex, int teamIndex = -1);</strong><br>
													  		Terminates current game and announces a winner. If teamIndex is -1, 
															the player is announced as the winner, otherwise the team is.</p>
														 <p>&nbsp;</p>
														<p><span class="style4 style7">Team Score Functions </span></p>
														<p><strong>BZF_API int bz_getTeamCount (bz_eTeamType team);</strong><br>
															Returns the player count of the specified team
														</p>
														<p><strong>BZF_API int bz_getTeamScore (bz_eTeamType team );</strong><br>
															Returns the team score for the specified team
														</p>
														<p><strong>BZF_API int bz_getTeamWins (bz_eTeamType team );</strong><br>
															Returns the team wins for the specified team
														</p>
														<p><strong>BZF_API int bz_getTeamLosses (bz_eTeamType team );</strong><br>
															Returns the team losses for the specified team
														</p>
														<p><strong>BZF_API void bz_setTeamWins (bz_eTeamType team, int wins );</strong><br>
															Sets the team wins for the specified team
														</p>
														<p><strong>BZF_API void bz_setTeamLosses (bz_eTeamType team, int losses );</strong><br>
															Sets the team losses for the specified team
														</p>
														<p><strong>BZF_API void bz_resetTeamScore (bz_eTeamType team );</strong><br>
															Resets to Zero the score for the specified team
														</p>
														<p>&nbsp;</p>
														<p><span class="style4 style7">Recording Functions </span></p>
														<p><strong>BZF_API bool bz_saveRecBuf( const char * _filename, int seconds);</strong><br>
															If a record buffer it active this saves the last 'seconds' seconds of it into 
															the file '_filename'. If _filename contains non-alphanumeric characters other 
															than '.' these will be replaced by '_'. If seconds is not given the whole 
															buffer is saved.
														</p>
														<p>&nbsp;</p>
														<p><span class="style4 style7">Text Utility  Functions </span></p>
														<p>These functions don't do anything in bzfs, they are just here to help out a 
															plugin by letting them use some of BZFlags OS independent utilities.</p>
														<p><strong>BZF_API const char *bz_format(const char* fmt, ...);</strong><br>
															Just like sprintf, but returns the formated string.
														</p>
														<p><strong>BZF_API const char *bz_toupper(const char* val );;</strong><br>
															Returns the input string all in upper case characters.
														</p>
														<p><strong>BZF_API const char *bz_tolower(const char* val );;</strong><br>
															Returns the input string all in lower case characters.
														</p>
														<p>&nbsp;</p>
														<p><span class="style4 style7">World Info  Functions </span></p>
														<p>These functions are used to give information about the world ( map ).</p>
														<p><strong>BZF_API bz_eTeamType bz_checkBaseAtPoint ( float pos[3] );</strong><br>
  This function will return the team that owns the base that is at the requested point. If there is no base at that point then the &quot;NoTeam&quot; team will be returned. This is useful for knowing where people are at a capture event. </p>
														<p>&nbsp;</p>
														<p><span class="style4 style7">Custom Slash Command Functions </span></p>
														<p>A plug-in can register a special handler for a custom / command. This allows a 
															plug-in to handle commands more easily than hooking into the 
															UnknownSlashCommand Event.</p>
														<p>Similar to other events, custom slash commands provide a pointer to a handler 
															class that the plugin overrides using the function.</p>
														<p><strong>BZF_API bool bz_registerCustomSlashCommand ( const char* command, 
																bz_CustomSlashCommandHandler *handler );</strong></p>
														<p>This command will register a custom slash command with the name provided in the 
															command parameter. You do NOT need to provide the "/" character in the command 
															name. The handler pointer is to a class that has been derived from <strong>bz_CustomSlashCommandHandler</strong></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">class bz_CustomSlashCommandHandler<br>
                {<br>
                                  </span>
																						<blockquote class="Code"> public:<br>
																							virtual ~bz_CustomSlashCommandHandler(){};<br>
																							virtual bool handle ( int playerID, bzApiString command, bzApiString message, 
																							bzAPIStringList *params ) = 0;</blockquote>
																						<p class="Code">};</p>
																					</td>
																				</tr>
																			</tbody>
																		</table>
																	</td>
																</tr>
															</tbody>
														</table>
														<p>When a player issues the command, the handler will have its handle method called 
															and then it can then do whatever it needs to. The Message parameter to the 
															handle function will contain all the text the user has entered, except the 
															/command name itself. The Params item will contain a list of the text broken 
															into a space delimited list. This is useful for commands that take parameters.
														</p>
														<p><strong>BZF_API bool bz_removeCustomSlashCommand ( const char* command );</strong><br>
															This command will remove a custom slash command from BZFS. Only one custom 
															slash command per name can be installed at a time. It is a good idea to make 
															your command name unique.</p>
													</td>
												</tr>
												<tr>
													<td>
														<div align="left"><a href="events.html">Previous</a></div>
														<div align="right" class="style5">Next</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">Current Maintainer</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>