TS2PerlMod GNU/GPL-Edition 0.9.18 Manual


1 About

The TS2PerlMod is a small but powerful script written in Perl that can be used to automate time-consuming tasks. The latest version called - TS2PerlMod GNU/GPL-Edition - has been released with the full source code under the GNU General Public License. We decided to do a complete rewrite of the original code to improve speed, performance and security.

Our self-made Perl module TeamSpeak2::TCPquery is now fully object-oriented and contains sub-packages to handle player, channel, and server objects easily. The Perl module will also be released in the CPAN network soon.

1.1 Requirements

Please verify that your system meets the following requirements:

1.2 Features

This version of the TS2PerlMod includes many innovative features such as:

Each feature can be activated or deactivated by using a configuration file.



2 Installing a new TS2PerlMod

First, unzip the achive you downloaded from the Planet TeamSpeak to your hard disk and then open the ts2perlmod folder. In the ts2perlmod folder you will find the following files:

  configs/...
  logs/...
  manual/...
  packages/...
  text/...
  ts2perlmod.pl
  ts2perlmod_startscript

The entire installation process should not take longer than five minutes. Before proceeding, you must make sure that Perl is installed on your system. On Windows servers, you can to use a ready-to-install distribution such as ActivePerl. ActivePerl is also available for Linux. To determine whether you have a valid installation, simply type perl -v on your servers command-line.

2.1 Configure the TS2PerlMod

Go to the ts2perlmod/configs folder. In the folder you will find a file called default.ini. Open the file with your favorite text editor.

The general format of the TS2PerlMod configuration file is quite simple. The file is divided into sections and each line from a specific section contains two parts (Parameter and Value). The details are explained below. If you're experiencing problems with your configuration file, we recommend the use of our free configuration tool, which is available on the Planet TeamSpeak website.

  [CONNECTION]
  ServerAddress=127.0.0.1        <-- Your servers IPv4 address or FQDN
  ServerTCPPort=51234            <-- Your servers TCP port
  ServerUDPPort=8767             <-- Your servers UDP port

  [LOGIN]
  Username=superadmin            <-- Your superadmin username
  Password=password              <-- Your superadmin password

  [EXTENDED-WELCOME-MESSAGE]
  Enabled=1                      <-- Enables/Disables the Extended Welcome Message
  File=welcome.txt               <-- This file contains your Extended Welcome Message

  [BAD-NICKNAME]
  Enabled=1                      <-- Enables/Disables the Illegal Nickname Detection
  File=badnick.txt               <-- This file contains your list of illegal words
  Punishment=move                <-- The punishment method {kick | move | ban | remove}
  Channel=your channelname       <-- This channel will be used if Punishment is set to move
  Reason=bad nickname            <-- User gets kicked with this reason if Pun. is set to kick
  Message=you've a bad nickname  <-- User receives this Msg if Pun. is set to move or remove
  
  [BAD-CHANNEL]
  Enabled=0                      <-- Enables/Disables the Illegal Channelname Detection
  File=badchannel.txt            <-- This file contains your list of illegal words
  Punishment=kick                <-- The punishment method {kick | move | ban | remove}
  Channel=bad channelname        <-- This channel will be used if Punishment is set to move
  Reason=bad channelname         <-- User gets kicked with this reason if Pun. is set to kick
  Message=you have a bad channel <-- User receives this Msg if Pun. is set to move or remove

  [MOVE-IDLERS]
  Enabled=1                      <-- Enables/Disables the Move Idlers feature
  Idletime=60                    <-- The targets idletime in minutes (integers only)
  Channel=idletime               <-- Idle users will be moved into this channel

  [WARN-IDLERS]
  Enabled=1                      <-- Enables/Disables the Warn Idlers feature
  Idletime=90                    <-- The targets idletime in minutes (integers only)
  Message=you are idle           <-- An idle user will receive this single-line message

  [KICK-IDLERS]
  Enabled=1                      <-- Enables/Disables the Move Idlers feature
  Idletime=120                   <-- The idletime in minutes (integers only)
  TargetPlayerR=1                <-- Defines wether reg. users shall be kicked or not
  TargetPlayerU=1                <-- Defines wether unreg. users shall be kicked or not
  TargetChannelR=1               <-- Defines wether users in reg. channels shall be kicked
  TargetChannelU=1               <-- Defines wether users in unreg. channels shall be kicked
  Reason=don't idle please       <-- Users will be kicked with this reason

  [ANTI-REC]
  Enabled=1                      <-- Enables/Disables the Anti Recording feature
  Punishment=kick                <-- The punishment method {kick | move | ban | remove}
  Channel=your channelname       <-- This channel will be used if Punishment is set to move
  Reason=no recording            <-- User gets kicked with this reason if Pun. is set to kick
  Message=do not record          <-- User receives this Msg if Pun. is set to move or remove

  [ANTI-FLOOD]
  Enabled=1                      <-- Enables/Disables the Anti Flood feature
  MaxConnections=3               <-- Max amount of new connections in x seconds
  MaxSeconds=10                  <-- Allows the number of connections set above in x seconds

  [TAKE-OVER-PROTECTION]
  Enabled=1                      <-- Enables/Disables the Take Over Protection feature
  Punishment=kick                <-- The punishment method {kick | move | ban | remove}
  Channel=your channelname       <-- This channel will be used if Punishment is set to move
  Reason=evil kick               <-- User gets kicked with this reason if Pun. is set to kick
  Message=nice try               <-- User receives this Msg if Pun. is set to move or remove

  [PROTECTED-USERS]
  Enabled=1                      <-- Enables/Disables the Protected Users feature
  File=protected.txt             <-- This file contains your list of illegal words

  [AUTO-AFK]
  Enabled=1                      <-- Enables/Disables the Protected Users feature
  Channel=your channelname       <-- Users will be moved into this channel if they're 'Away'

  [ADVERT-MESSAGE]
  Enabled=1                      <-- Enables/Disables the Protected Users feature
  File=advert.txt                <-- This file contains your Advert Message
  Interval=60                    <-- The message interval in minutes (integers only)

  [STATS-MESSAGE]
  Enabled=1                      <-- Enables/Disables the Stats Message feature
  File=stats.txt                 <-- This file contains your Stats Message
  Interval=30                    <-- The message interval in minutes (integers only)

  [STICKY-CHANNEL]
  Enabled=1                      <-- Enables/Disables the Sticky Channel feature
  Channel=your channelname       <-- Users will be bound to this channel when moved into it
  
  [UPDATE-BANLIST]
  Enabled=0                      <-- Enables/Disables the Update Banlist feature
  Bantime=10                     <-- The new timeban duration in minutes (integers only)

  [AUTO-SERVERTYPE]
  Enabled=0                      <-- Enables/Disables the Auto Servertype feature
  Clients=50                     <-- The min # of clients for a public server (integers only)
  Interval=60                    <-- The update interval in minutes (integers only)

  [BUG-DETECTION]
  Enabled=0                      <-- Enables/Disables the Bug Detection feature

  [LOG]
  Enabled=1                      <-- Enables/Disables the Log feature
  File=default.log               <-- This file will be used for the Log feature

  [TIMER]
  RepeatTimer=2                  <-- Time in seconds in which the TS2PerlMod will check for
                                     any changes done to the server, in order to perform the 
                                     above tasks at a comfortable speed

Please note that the settings shown above are just samples. Simply modify the configuration file on your server to meet your requirements.

2.2.1 Configurator

Our exclusive configuration utility - called Configurator - allows you to edit your configuration files through a comfortable GUI. This application is also released with the full source code under the GNU General Public License.

2.2 Edit the text files

After you've configured the TS2PerlMod in accordance with your requirements, you should edit the various text files. You can use the following variables to individualize your Extended Welcome Message and Stats Message:

Variable Description Output Example
<PLAYER_ID> The users ID 4651
<PLAYER_NICKNAME> The users nickname ScP
<PLAYER_LOGINNAME> The users loginname admin
<PLAYER_PACKETS_SENT> The number of packets sent by the user 31.433.187
<PLAYER_PACKETS_RECEIVED> The number of packets received by the user 12.321.545
<PLAYER_DATA_SENT> The ammount of data sent by the user 5,42 MByte
<PLAYER_DATA_RECEIVED> The ammount of data received by the user 2,01 MByte
<PLAYER_PACKET_LOSS> The users UDP packet loss in percent 0.02%
<PLAYER_PING> The users Ping delay in ms 12
<PLAYER_IP> The users IP address 84.75.122.43
<PLAYER_LOGINTIME> The users logintime 0D 00:04:12
<PLAYER_IDLETIME> The users idletime 0D 00:00:13
<PLAYER_FLAGS> The users current flags (R SA)
<CHANNEL_ID> The ID of the channel that the user is currently in 3
<CHANNEL_NAME> The name of the channel that the user is currently in Talk Channels
<CHANNEL_FLAGS> The flags of the channel that the user is currently in (RMS)
<CHANNEL_CODEC> The codec of the channel that the user is currently in Speex 12.3
<CHANNEL_ORDER> The sort order of the channel that the user is currently in 3200
<CHANNEL_MAX_USERS> The max. user count of the channel that the user is currently in 100
<CHANNEL_TOPIC> The topic of the channel that the user is currently in Talk with us!
<SERVER_ID> The virtual servers ID 1
<SERVER_NAME> The virtual servers name Planet TeamSpeak
<SERVER_PORT> The virtual servers UDP port 8767
<SERVER_UPTIME> The virtual servers uptime 15D 23:02:32
<SERVER_VERSION> The TeamSpeak servers version 2.0.23.2
<SERVER_LICENSE> The TeamSpeak servers license type Freeware
<SERVER_PLATFORM> The TeamSpeak servers platform Linux
<SERVER_CURRENT_USERS> The number of users connected to the virtual server 13
<SERVER_MAX_USERS> The number of slots of the virtual server 100
<SERVER_CURRENT_CHANNELS> The number of channels created on the virtual server 25
<SERVER_PACKETS_SENT> The number of packets sent by the virtual server 187.653.353
<SERVER_PACKETS_RECEIVED> The number of packets received by the virtual server 232.323.435
<SERVER_DATA_SENT> The ammount of data sent by the virtual server 1,32 GByte
<SERVER_DATA_RECEIVED> The ammount of data received by the virtual server 1,14 GByte
<SERVER_BANDWIDTH_IN> The incoming bandwidth used by the virtual server 2,02 KByte/s
<SERVER_BANDWIDTH_OUT> The outgoing bandwidth used by the virtual server 5,14 KByte/s
<SERVER_BANDWIDTH_TOTAL> The total bandwidth used by the virtual server 7,16 KByte/s
<SERVER_WEBPOST_POSTURL> The virtual servers WebPost Post URL http://webpost.teamspeak-einstieg.de/webpost.php
<SERVER_WEBPOST_LINKURL> The virtual servers WebPost Link URL http://www.planetteamspeak.com



3 Starting the TS2PerlMod

To finally start the TS2PerlMod, simply execute the ts2perlmod.pl. We've also included a simple startscript that can be used on Linux servers.

3.1 Using the TS2PerlMod with multiple virtual TeamSpeak 2 servers

The latest release of the TS2PerlMod provides several start parameters that allow you to start multiple instances of the script with different configuration files. You can have as many configuration files as you want, simply install one copy of default.ini and then configure it to behave differently for your previous virtual TeamSpeak servers.

The following start parameters are available:

Parameter Platform Description Usage Example
-config Windows & Linux Use another configuration file ts2perlmod.pl -config=8767.ini
-pid Linux Use another PID file ts2perlmod.pl -pidfile=8767.pid
-daemon Linux Daemonize the script ts2perlmod.pl -daemon

You can also edit the ts2perlmod_startscript by simply opening the file in your favorite text editor and finding the following lines:

  # ~~ BEGIN CONFIGURATION ~~~~~~~~~

  CFG=default.ini
  PID=ts2perlmod.pid

  # ~~~END CONFIGURATION ~~~~~~~~~~~

Since version 0.9.15 a seperate startscript called ts2perlmod_multi_startscript is included in this package. This startscript will automatically start a new TS2PerlMod instance for every configuration file that exists in the ts2perlmod/configs folder.



4 Special Thanks

We'd like to thank the following persons:



Please visit the Planet TeamSpeak forums if you have any bugs to report or features to request.

Have fun!

Back to Top

Last Changed: May 22th, 2007