TeamTalk 5 C-API DLL Version 5.13A
Server Administration

This section explains how to configure a server and setup user accounts. More...

Classes

struct  ServerProperties
 A struct containing the properties of the server's settings. More...
 
struct  ServerStatistics
 A struct containing the server's statistics, i.e. bandwidth usage and user activity. More...
 
struct  BannedUser
 A struct containing the properties of a banned user. More...
 
struct  AbusePrevention
 Properties to prevent server abuse. More...
 
struct  UserAccount
 A struct containing the properties of a user account. More...
 

Typedefs

typedef enum UserRight UserRight
 The rights users have once they have logged on to the server. More...
 
typedef UINT32 UserRights
 A bitmask based on UserRight for holding the rights users have who log on the server. More...
 
typedef enum ServerLogEvent ServerLogEvent
 Events that are logged by the server, i.e. written to server's log file. More...
 
typedef UINT32 ServerLogEvents
 Bitmask of ServerLogEvent. More...
 
typedef struct ServerProperties ServerProperties
 A struct containing the properties of the server's settings. More...
 
typedef struct ServerStatistics ServerStatistics
 A struct containing the server's statistics, i.e. bandwidth usage and user activity. More...
 
typedef enum BanType BanType
 Way to ban a user from either login or joining a channel. More...
 
typedef UINT32 BanTypes
 A mask of types of bans that apply. More...
 
typedef struct BannedUser BannedUser
 A struct containing the properties of a banned user. More...
 
typedef struct AbusePrevention AbusePrevention
 Properties to prevent server abuse. More...
 
typedef struct UserAccount UserAccount
 A struct containing the properties of a user account. More...
 

Enumerations

enum  UserRight {
  USERRIGHT_NONE = 0x00000000 , USERRIGHT_MULTI_LOGIN = 0x00000001 , USERRIGHT_VIEW_ALL_USERS = 0x00000002 , USERRIGHT_CREATE_TEMPORARY_CHANNEL = 0x00000004 ,
  USERRIGHT_MODIFY_CHANNELS = 0x00000008 , USERRIGHT_TEXTMESSAGE_BROADCAST = 0x00000010 , USERRIGHT_KICK_USERS = 0x00000020 , USERRIGHT_BAN_USERS = 0x00000040 ,
  USERRIGHT_MOVE_USERS = 0x00000080 , USERRIGHT_OPERATOR_ENABLE = 0x00000100 , USERRIGHT_UPLOAD_FILES = 0x00000200 , USERRIGHT_DOWNLOAD_FILES = 0x00000400 ,
  USERRIGHT_UPDATE_SERVERPROPERTIES = 0x00000800 , USERRIGHT_TRANSMIT_VOICE = 0x00001000 , USERRIGHT_TRANSMIT_VIDEOCAPTURE = 0x00002000 , USERRIGHT_TRANSMIT_DESKTOP = 0x00004000 ,
  USERRIGHT_TRANSMIT_DESKTOPINPUT = 0x00008000 , USERRIGHT_TRANSMIT_MEDIAFILE_AUDIO = 0x00010000 , USERRIGHT_TRANSMIT_MEDIAFILE_VIDEO = 0x00020000 , USERRIGHT_TRANSMIT_MEDIAFILE = USERRIGHT_TRANSMIT_MEDIAFILE_VIDEO | USERRIGHT_TRANSMIT_MEDIAFILE_AUDIO ,
  USERRIGHT_LOCKED_NICKNAME = 0x00040000 , USERRIGHT_LOCKED_STATUS = 0x00080000 , USERRIGHT_RECORD_VOICE = 0x00100000 , USERRIGHT_VIEW_HIDDEN_CHANNELS = 0x00200000
}
 The rights users have once they have logged on to the server. More...
 
enum  ServerLogEvent {
  SERVERLOGEVENT_NONE = 0x00000000 , SERVERLOGEVENT_USER_CONNECTED = 0x00000001 , SERVERLOGEVENT_USER_DISCONNECTED = 0x00000002 , SERVERLOGEVENT_USER_LOGGEDIN = 0x00000004 ,
  SERVERLOGEVENT_USER_LOGGEDOUT = 0x00000008 , SERVERLOGEVENT_USER_LOGINFAILED = 0x00000010 , SERVERLOGEVENT_USER_TIMEDOUT = 0x00000020 , SERVERLOGEVENT_USER_KICKED = 0x00000040 ,
  SERVERLOGEVENT_USER_BANNED = 0x00000080 , SERVERLOGEVENT_USER_UNBANNED = 0x00000100 , SERVERLOGEVENT_USER_UPDATED = 0x00000200 , SERVERLOGEVENT_USER_JOINEDCHANNEL = 0x00000400 ,
  SERVERLOGEVENT_USER_LEFTCHANNEL = 0x00000800 , SERVERLOGEVENT_USER_MOVED = 0x00001000 , SERVERLOGEVENT_USER_TEXTMESSAGE_PRIVATE = 0x00002000 , SERVERLOGEVENT_USER_TEXTMESSAGE_CUSTOM = 0x00004000 ,
  SERVERLOGEVENT_USER_TEXTMESSAGE_CHANNEL = 0x00008000 , SERVERLOGEVENT_USER_TEXTMESSAGE_BROADCAST = 0x00010000 , SERVERLOGEVENT_CHANNEL_CREATED = 0x00020000 , SERVERLOGEVENT_CHANNEL_UPDATED = 0x00040000 ,
  SERVERLOGEVENT_CHANNEL_REMOVED = 0x00080000 , SERVERLOGEVENT_FILE_UPLOADED = 0x00100000 , SERVERLOGEVENT_FILE_DOWNLOADED = 0x00200000 , SERVERLOGEVENT_FILE_DELETED = 0x00400000 ,
  SERVERLOGEVENT_SERVER_UPDATED = 0x00800000 , SERVERLOGEVENT_SERVER_SAVECONFIG = 0x01000000
}
 Events that are logged by the server, i.e. written to server's log file. More...
 
enum  BanType { BANTYPE_NONE = 0x00 , BANTYPE_CHANNEL = 0x01 , BANTYPE_IPADDR = 0x02 , BANTYPE_USERNAME = 0x04 }
 Way to ban a user from either login or joining a channel. More...
 

Functions

TEAMTALKDLL_API TTBOOL TT_GetServerProperties (IN TTInstance *lpTTInstance, OUT ServerProperties *lpServerProperties)
 Get the server's properties. More...
 
TEAMTALKDLL_API TTBOOL TT_GetServerUsers (IN TTInstance *lpTTInstance, IN OUT User *lpUsers, IN OUT INT32 *lpnHowMany)
 Get all the users on the server. More...
 

Detailed Description

This section explains how to configure a server and setup user accounts.

The server keeps track of which users are in which channels and ensures that users in the same channel can communicate with each other. It is also the job of the server to provide user authentication so only users with the proper credentials are allowed to do certain operations.

It is a good idea to check out section TeamTalk Server Setup Guide to learn how to configure the TeamTalk server.

The server's name, message of the day (MOTD) can be updated using the ServerProperties-struct. Only users with USERRIGHT_UPDATE_SERVERPROPERTIES are allowed change a server's properties while it's running. This is done using the command TT_DoUpdateServer().

Sections:

User Administration

Two types of users exists on a server, default users (USERTYPE_DEFAULT) and administrator users (USERTYPE_ADMIN). The UserType-enum can be used to see who is what. A user of USERTYPE_ADMIN have unrestricted rights on the server and can issue any command to the server whereas a default user is limited to the UserRights which are assigned to the uUserRights member of the user's UserAccount.

As administrator it is possible to list all users who have an account on the server using TT_DoListUserAccounts. To create a new user account call the command TT_DoNewUserAccount and to delete an account call TT_DoDeleteUserAccount.

Kicking and Banning Users

Sometimes it may be necessary to kick and ban users from a server. With USERRIGHT_KICK_USERS it is possible to use the command TT_DoKickUser() to kick a user off the server. A channel operator (TT_DoChannelOp()) can also kick a user from a channel (but not off a server).

With USERRIGHT_BAN_USERS it is also possible to ban users from the server, so they can no longer log in. This can be done using TT_DoBanUser(). To list who are currently banned call TT_DoListBans() and to remove a ban call TT_DoUnBanUser().

Typedef Documentation

◆ UserRight

typedef enum UserRight UserRight

The rights users have once they have logged on to the server.

ServerProperties holds the user rights in its uUserRights member variable and is retrieved by calling TT_GetServerProperties once connected to the server.

See also
ServerProperties
TT_GetServerProperties

◆ UserRights

typedef UINT32 UserRights

A bitmask based on UserRight for holding the rights users have who log on the server.

See also
ServerProperties

Definition at line 1706 of file TeamTalk.h.

◆ ServerLogEvent

Events that are logged by the server, i.e. written to server's log file.

See also
ServerProperties
TT_DoUpdateServer()

◆ ServerLogEvents

typedef UINT32 ServerLogEvents

Bitmask of ServerLogEvent.

See also
ServerProperties

Definition at line 1773 of file TeamTalk.h.

◆ ServerProperties

A struct containing the properties of the server's settings.

The server properties is available after a successful call to TT_DoLogin

See also
TT_DoUpdateServer
TT_GetServerProperties
TT_Login
UserRight

◆ ServerStatistics

A struct containing the server's statistics, i.e. bandwidth usage and user activity.

Use TT_DoQueryServerStats() to query the server's statistics.

◆ BanType

typedef enum BanType BanType

Way to ban a user from either login or joining a channel.

See also
BannedUser

◆ BanTypes

typedef UINT32 BanTypes

A mask of types of bans that apply.

See also
BanType

Definition at line 1944 of file TeamTalk.h.

◆ BannedUser

typedef struct BannedUser BannedUser

A struct containing the properties of a banned user.

See also
TT_DoListBans()
TT_DoBanUserEx()

◆ AbusePrevention

Properties to prevent server abuse.

The AbusePrevention-struct is part of UserAccount and can be used to limit the number of commands a user can issue to the server.

Requires TeamTalk version 5.2.3.4896.

◆ UserAccount

typedef struct UserAccount UserAccount

A struct containing the properties of a user account.

A registered user is one that has a user account on the server.

See also
TT_DoListUserAccounts
TT_DoNewUserAccount
TT_DoDeleteUserAccount

Enumeration Type Documentation

◆ UserRight

enum UserRight

The rights users have once they have logged on to the server.

ServerProperties holds the user rights in its uUserRights member variable and is retrieved by calling TT_GetServerProperties once connected to the server.

See also
ServerProperties
TT_GetServerProperties
Enumerator
USERRIGHT_NONE 

Users who log onto the server has none of the rights below.

USERRIGHT_MULTI_LOGIN 

Allow multiple users to log on to the server with the same UserAccount.

See also
TT_DoLogin()
USERRIGHT_VIEW_ALL_USERS 

User can see users in all other channels.

USERRIGHT_CREATE_TEMPORARY_CHANNEL 

User is allowed to create temporary channels which disappear when last user leaves the channel.

See also
TT_DoJoinChannel()
USERRIGHT_MODIFY_CHANNELS 

User is allowed to create permanent channels which are stored in the server's configuration file.

See also
TT_DoMakeChannel()
USERRIGHT_TEXTMESSAGE_BROADCAST 

User can broadcast text message of type MSGTYPE_BROADCAST to all users.

USERRIGHT_KICK_USERS 

User can kick users off the server.

See also
TT_DoKickUser()
USERRIGHT_BAN_USERS 

User can add and remove banned users.

See also
TT_DoBanUser()
TT_DoListBans()
USERRIGHT_MOVE_USERS 

User can move users from one channel to another.

See also
TT_DoMoveUser()
USERRIGHT_OPERATOR_ENABLE 

User can make other users channel operator.

See also
TT_DoChannelOp()
USERRIGHT_UPLOAD_FILES 

User can upload files to channels.

See also
TT_DoSendFile()
USERRIGHT_DOWNLOAD_FILES 

User can download files from channels.

See also
TT_DoRecvFile()
USERRIGHT_UPDATE_SERVERPROPERTIES 

User can update server properties.

See also
TT_DoUpdateServer()
USERRIGHT_TRANSMIT_VOICE 

Users are allowed to forward audio packets through server. TT_EnableVoiceTransmission()

USERRIGHT_TRANSMIT_VIDEOCAPTURE 

User is allowed to forward video packets through server. TT_StartVideoCaptureTransmission()

USERRIGHT_TRANSMIT_DESKTOP 

User is allowed to forward desktop packets through server.

See also
TT_SendDesktopWindow()
USERRIGHT_TRANSMIT_DESKTOPINPUT 

User is allowed to forward desktop input packets through server.

See also
TT_SendDesktopInput()
USERRIGHT_TRANSMIT_MEDIAFILE_AUDIO 

User is allowed to stream audio files to channel.

See also
TT_StartStreamingMediaFileToChannel()
USERRIGHT_TRANSMIT_MEDIAFILE_VIDEO 

User is allowed to stream video files to channel.

See also
TT_StartStreamingMediaFileToChannel()
USERRIGHT_TRANSMIT_MEDIAFILE 

User is allowed to stream media files to channel.

See also
TT_StartStreamingMediaFileToChannel()
USERRIGHT_LOCKED_NICKNAME 

User's nick name is locked. TT_DoChangeNickname() cannot be used and TT_DoLogin() will ignore szNickname parameter.

See also
TT_DoLogin()
TT_DoLoginEx()
TT_DoChangeNickname()
USERRIGHT_LOCKED_STATUS 

User's status is locked. TT_DoChangeStatus() cannot be used.

USERRIGHT_RECORD_VOICE 

User can record voice in all channels. Even channels with CHANNEL_NO_RECORDING.

USERRIGHT_VIEW_HIDDEN_CHANNELS 

User can see hidden channels, CHANNEL_HIDDEN.

Definition at line 1624 of file TeamTalk.h.

◆ ServerLogEvent

Events that are logged by the server, i.e. written to server's log file.

See also
ServerProperties
TT_DoUpdateServer()
Enumerator
SERVERLOGEVENT_NONE 

Nothing is logged to file by server.

SERVERLOGEVENT_USER_CONNECTED 

User's IP-address is logged to file by serer.

SERVERLOGEVENT_USER_DISCONNECTED 

User disconnected from server is logged to file by the server.

SERVERLOGEVENT_USER_LOGGEDIN 

User logged in is logged to file by the server.

SERVERLOGEVENT_USER_LOGGEDOUT 

User logged out is logged to file by the server.

SERVERLOGEVENT_USER_LOGINFAILED 

User failed to log in is logged to file by the server.

SERVERLOGEVENT_USER_TIMEDOUT 

User disconnected due to connection timeout is logged to file by the server.

SERVERLOGEVENT_USER_KICKED 

User was kicked is logged to file by the server.

SERVERLOGEVENT_USER_BANNED 

User was banned is logged to file by the server.

SERVERLOGEVENT_USER_UNBANNED 

User was removed from ban list is logged to file by the server.

SERVERLOGEVENT_USER_UPDATED 

User's status is logged to file by the server.

SERVERLOGEVENT_USER_JOINEDCHANNEL 

User joined a channel is logged to file by the server.

SERVERLOGEVENT_USER_LEFTCHANNEL 

User left a channel is logged to file by the server.

SERVERLOGEVENT_USER_MOVED 

User was moved to another channel is logged to file by the server.

SERVERLOGEVENT_USER_TEXTMESSAGE_PRIVATE 

User's private text messages are logged to file by the server.

SERVERLOGEVENT_USER_TEXTMESSAGE_CUSTOM 

User's custom text messages are logged to file by the server.

SERVERLOGEVENT_USER_TEXTMESSAGE_CHANNEL 

User's channel text messages are logged to file by the server.

SERVERLOGEVENT_USER_TEXTMESSAGE_BROADCAST 

User's broadcast text messages are logged to file by the server.

SERVERLOGEVENT_CHANNEL_CREATED 

User created new channel is logged to file by the server.

SERVERLOGEVENT_CHANNEL_UPDATED 

User updated a channel is logged to file by the server.

SERVERLOGEVENT_CHANNEL_REMOVED 

User removed a channel is logged to file by the server.

SERVERLOGEVENT_FILE_UPLOADED 

User uploaded a file is logged to file by the server.

SERVERLOGEVENT_FILE_DOWNLOADED 

User downloaded a file is logged to file by the server.

SERVERLOGEVENT_FILE_DELETED 

User deleted a file is logged to file by the server.

SERVERLOGEVENT_SERVER_UPDATED 

User updated server's properties is logged to file by the server.

SERVERLOGEVENT_SERVER_SAVECONFIG 

User saved server's configuration is logged to file by the server.

Definition at line 1715 of file TeamTalk.h.

◆ BanType

enum BanType

Way to ban a user from either login or joining a channel.

See also
BannedUser
Enumerator
BANTYPE_NONE 

Ban type not set.

BANTYPE_CHANNEL 

The ban applies to the channel specified in the szChannel of BannedUser. Otherwise the ban applies to the entire server.

BANTYPE_IPADDR 

Ban szIPAddress specified in BannedUser. szIPAddress can be a regular expression, i.e. 129.16.22.* or 192.*.0.45.

BANTYPE_USERNAME 

Ban szUsername specified in BannedUser.

Definition at line 1927 of file TeamTalk.h.

Function Documentation

◆ TT_GetServerProperties()

TEAMTALKDLL_API TTBOOL TT_GetServerProperties ( IN TTInstance lpTTInstance,
OUT ServerProperties lpServerProperties 
)

Get the server's properties.

Parameters
lpTTInstancePointer to client instance created by TT_InitTeamTalk.
lpServerPropertiesA struct to hold the server's properties.

◆ TT_GetServerUsers()

TEAMTALKDLL_API TTBOOL TT_GetServerUsers ( IN TTInstance lpTTInstance,
IN OUT User lpUsers,
IN OUT INT32 *  lpnHowMany 
)

Get all the users on the server.

If only users in a specific channel is needed call TT_GetChannelUsers()

Parameters
lpTTInstancePointer to client instance created by TT_InitTeamTalk.
lpUsersA preallocated array which has room for lpnHowMany User elements. Pass NULL to query the number of users in channel.
lpnHowManyThe number of elements in the array lpUsers. If lpUsers is NULL lpnHowMany will receive the number of users.
See also
TT_GetChannelUsers
TT_GetUser
TT_GetServerChannels