This wiki is archived and useful information is being migrated to the main bzflag.org website

Difference between revisions of "BZAdmin"

From BZFlagWiki
Jump to: navigation, search
(copy BzAdmin from old wiki)
 
(Command Line Options: added wiki table)
 
(15 intermediate revisions by 6 users not shown)
Line 1: Line 1:
BZAdmin is a text client for BZFlag. It is primarily meant to be a tool for server administrators, but it can also be used for other things. Read the man page for more details.
+
[[BZAdmin]] is a text-only client for [[BZFlag]]. It is primarily meant to be a tool for server administrators, but it can also be used for other things. Read the man page for more details.
  
On the Mac, use a shell (Terminal.app) and run /Applications/BZFlag*/Contents/MacOS/bzadmin <name>@<server>
+
When you start [[BZAdmin]] without any command line options other than callsign and hostname a simple curses-based user interface will be started (unless you built [[BZAdmin]] without curses support). This interface is divided into three rectangles; the output window (which covers almost all of the terminal), the target window, and the input window.
 +
 +
The curses user interface also has a simple menu system where you can edit the server variables (if you are an admin) and see a player list. If you are an admin you can also see the IP addresses in the player list, if you have sent a /playerlist command. The menu shows up when you hit the F2 key. It only covers the upper half of the screen, so you can still see what's going on in the game. You can navigate through the menu with the up and down arrow keys, and use the enter key to select submenus and other menu items. If you hit F2 again the command prompt will regain keyboard focus, but the menu will still be visible. If you hit F2 a third time the menu will go away.
  
The man page:
+
== Running BZAdmin ==
  
bzadmin(6) bzadmin(6)
+
BZAdmin is run from the command line with its required arguments, a callsign and a server:
+
 
NAME
+
Please note: fields surrounded by brackets e.g. "[field]" are optional''
+
 
      bzadmin - a text based client for BZFlag
+
{|
+
|
  SYNOPSIS
+
  bzadmin callsign[:password]@server[:port]
+
|}
      bzadmin [-help] [-hide msgtype{,msgtype}*] [-show msgtype{,msgtype}*] [-ui {curses | stdboth | stdin | stdout}] callsign@hostname:[port] [command] [command] ...
+
 
+
=== Examples ===
DESCRIPTION
+
 
+
On specific platforms for the callsign "example" with a password of "password" accessing the viper.pimpi.org server at port 5158:
      bzadmin is a textbased client for the game BZFlag. It can't be used for playing, but it can be used to see when players join and leave the game, to see the chat messages, and to send messages and commands to the server.
+
 
+
==== Windows ====
      When you start bzadmin without any command line options other than callsign and hostname a simple curses-based user interface will be started (unless you built bzadmin without curses support). This interface is divided into three rectangles; the output window (which covers almost all of the termi- nal), the target window, and the input window. the server has sent you that players IP address (as a response to a /playerlist command).
+
Open up a command prompt (start -> run -> "cmd") and type:
+
 
      The curses user interface also has a simple menu system where you can edit the server variables (if you are an admin) and see a player list. If you are an admin you can also see the IP addresses in the player list, if you have sent a /playerlist command. The menu shows up when you hit the F2 key. It only covers the upper half of the screen, so you can still see what's going on in the game. You can navigate through the menu with the up and down arrow keys, and use the enter key to select submenus and other menu items. If you hit F2 again the command prompt will regain keyboard focus, but the menu will still be visible. If you hit F2 a third time the menu will go away.
+
{|
   
+
|
      Options
+
"C:\Program Files\BZFlag2.4.0_32Bit\bzadmin.exe" example:password@viper.pimpi.org:5158"
+
|}
            -help Show a simple help text.
+
 
+
==== Mac OS X ====
            -hide msgtype{,msgtype}*
+
 
+
Open up a terminal (/Applications/Utilities/Terminal.app) and type:
                  Tell bzadmin not to show these message types. The available message types arechat, join, kill, leave, pause, ping, rabbit, and spawn. By default chat, join, kill, leave, pause, and rabbit are shown.  
+
 
+
{|
            -show msgtype{,msgtype}*
+
|
+
/Applications/BZFlag2.4.0.app/Contents/MacOS/bzadmin example:password@viper.pimpi.org:5158
                  Tell bzadmin to show these message types. See -hide for a list of available message types. If a message type is listed both in -show and -hide it will not be shown.  
+
|}
+
 
            -ui {curses | stdboth | stdin | stdout}
+
==== Linux ====
+
Open up a terminal and type:
                  Select the user interface that you want. The curses interface is the default, and it is described above. The stdin interface reads user commands from the standard in stream and sends them to the server. All server output is ignored. The stdout interface prints all server output to the standard out stream. All user input is ignored. The stdboth interface is a combination of stdin and stdout - it prints server output to the standard out stream, and reads user commands from the standard in stream.  
+
 
+
{|
            callsign@hostname[:port]
+
|
+
  /usr/local/bin/bzadmin example:password@viper.pimpi.org:5158
                  Specifies the callsign that you want your client to use, and the hostname where the BZFlag server is. The port number is optional, and the default value is 5154.
+
|}
+
 
            command You can specify messages and commands to send to the server on the command line.
+
== Command Line Options ==
+
{|{{Prettytable}}
                  If any such commands are specified, bzadmin will exit as soon as those commands has been sent, without starting an user interface.
+
|-
+
| {{Hl3}} |'''Command'''
      Examples
+
| {{Hl3}} |'''Description'''
+
|-
            bzadmin admin@localhost:5154
+
| '''-help''' || This will display a help message including a list of command line options.
+
|-
                  Join the game on localhost, port 5154, using the callsign 'admin'.  
+
| '''-hide msgtype{,msgtype}*''' || Tell bzadmin not to show these message types. The available message types are: chat, join, kill, leave, pause, ping, rabbit, and spawn. By default chat, join, kill, leave, pause, and rabbit are shown.
   
+
|-
            bzadmin admin@localhost "/passwd secretpass" "/ban 192.168.0.2"
+
| '''-show msgtype{,msgtype}*''' || Tell bzadmin to show these message types. See -hide for a list of available message types. If a message type is listed both in -show and -hide it will not be shown.  
+
|-
                  Connect to the server at localhost and ban the IP 192.168.0.2.  
+
| '''-ui <nowiki>{curses | stdboth | stdin | stdout}</nowiki>''' || Select the user interface that you want. The curses interface is the default, and it is described above. The stdin interface reads user commands from the standard in stream and sends them to the server. All server output is ignored. The stdout interface prints all server output to the standard out stream. All user input is ignored. The stdboth interface is a combination of stdin and stdout - it prints server output to the standard out stream, and reads user commands from the standard in stream.
+
|-
            bzadmin -ui stdout spy@bzserver.xy | grep magicword
+
|}
+
 
                  Connect to bzserver.xy and print all server messages that contain 'magicword'.
+
== Other Examples ==
 +
Join the game on localhost, port 5154, using the callsign 'admin'.  
 +
{|
 +
|
 +
  bzadmin admin@localhost:5154
 +
|}
 +
Connect to the server at localhost and ban the IP 192.168.0.2 for 2 hours.
 +
{|
 +
|
 +
bzadmin admin@localhost "/password secretpass" "/ban 192.168.0.2 2h test"
 +
|}
 +
Connect to bzserver.org and print all server messages that contain 'magicword'.
 +
{|
 +
|
 +
bzadmin -ui stdout spy@bzserver.org | grep magicword
 +
|}
 +
[[Category:Client]]

Latest revision as of 22:31, 15 February 2017

BZAdmin is a text-only client for BZFlag. It is primarily meant to be a tool for server administrators, but it can also be used for other things. Read the man page for more details.

When you start BZAdmin without any command line options other than callsign and hostname a simple curses-based user interface will be started (unless you built BZAdmin without curses support). This interface is divided into three rectangles; the output window (which covers almost all of the terminal), the target window, and the input window.

The curses user interface also has a simple menu system where you can edit the server variables (if you are an admin) and see a player list. If you are an admin you can also see the IP addresses in the player list, if you have sent a /playerlist command. The menu shows up when you hit the F2 key. It only covers the upper half of the screen, so you can still see what's going on in the game. You can navigate through the menu with the up and down arrow keys, and use the enter key to select submenus and other menu items. If you hit F2 again the command prompt will regain keyboard focus, but the menu will still be visible. If you hit F2 a third time the menu will go away.

Running BZAdmin[edit]

BZAdmin is run from the command line with its required arguments, a callsign and a server:

Please note: fields surrounded by brackets e.g. "[field]" are optional

bzadmin callsign[:password]@server[:port]

Examples[edit]

On specific platforms for the callsign "example" with a password of "password" accessing the viper.pimpi.org server at port 5158:

Windows[edit]

Open up a command prompt (start -> run -> "cmd") and type:

"C:\Program Files\BZFlag2.4.0_32Bit\bzadmin.exe" example:password@viper.pimpi.org:5158"

Mac OS X[edit]

Open up a terminal (/Applications/Utilities/Terminal.app) and type:

/Applications/BZFlag2.4.0.app/Contents/MacOS/bzadmin example:password@viper.pimpi.org:5158

Linux[edit]

Open up a terminal and type:

/usr/local/bin/bzadmin example:password@viper.pimpi.org:5158

Command Line Options[edit]

Command Description
-help This will display a help message including a list of command line options.
-hide msgtype{,msgtype}* Tell bzadmin not to show these message types. The available message types are: chat, join, kill, leave, pause, ping, rabbit, and spawn. By default chat, join, kill, leave, pause, and rabbit are shown.
-show msgtype{,msgtype}* Tell bzadmin to show these message types. See -hide for a list of available message types. If a message type is listed both in -show and -hide it will not be shown.
-ui {curses | stdboth | stdin | stdout} Select the user interface that you want. The curses interface is the default, and it is described above. The stdin interface reads user commands from the standard in stream and sends them to the server. All server output is ignored. The stdout interface prints all server output to the standard out stream. All user input is ignored. The stdboth interface is a combination of stdin and stdout - it prints server output to the standard out stream, and reads user commands from the standard in stream.

Other Examples[edit]

Join the game on localhost, port 5154, using the callsign 'admin'.

bzadmin admin@localhost:5154

Connect to the server at localhost and ban the IP 192.168.0.2 for 2 hours.

bzadmin admin@localhost "/password secretpass" "/ban 192.168.0.2 2h test"

Connect to bzserver.org and print all server messages that contain 'magicword'.

bzadmin -ui stdout spy@bzserver.org | grep magicword