TeamTalk 5 Java DLL: Client/Server Commands

TeamTalk 5 Java DLL Version 5.18A

Loading...
Searching...
No Matches
Functions
Client/Server Commands

This section contains the list of commands which can be issued by the client instance to the server. More...

## Functions

int | BearWare.TeamTalkBase.DoPing ()
| Ping server and wait for server to reply.
int | BearWare.TeamTalkBase.DoLogin (string szNickname, string szUsername, string szPassword)
| Same as DologinEx() but without the option to specify `szClientName`. Kept for backwards compatibility.
int | BearWare.TeamTalkBase.DoLoginEx (string szNickname, string szUsername, string szPassword, string szClientName)
| Logon to a server.
int | BearWare.TeamTalkBase.DoLogout ()
| Logout of the server.
int | BearWare.TeamTalkBase.DoJoinChannel (Channel lpChannel)
| Create a new channel and join it.
int | BearWare.TeamTalkBase.DoJoinChannelByID (int nChannelID, string szPassword)
| Join an existing channel.
int | BearWare.TeamTalkBase.DoLeaveChannel ()
| Leave the current channel.
int | BearWare.TeamTalkBase.DoChangeNickname (string szNewNick)
| Change the client instance's nick name.
int | BearWare.TeamTalkBase.DoChangeStatus (int nStatusMode, string szStatusMessage)
| Change the client instance's currect status.
int | BearWare.TeamTalkBase.DoTextMessage (TextMessage lpTextMessage)
| Send a text message to either a user or a channel.
int | BearWare.TeamTalkBase.DoChannelOp (int nUserID, int nChannelID, bool bMakeOperator)
| Make another user operator of a channel.
int | BearWare.TeamTalkBase.DoChannelOpEx (int nUserID, int nChannelID, string szOpPassword, bool bMakeOperator)
| Make another user operator of a channel using the szOpPassword of BearWare.Channel.
int | BearWare.TeamTalkBase.DoKickUser (int nUserID, int nChannelID)
| Kick user from either channel or server.
int | BearWare.TeamTalkBase.DoSendFile (int nChannelID, string szLocalFilePath)
| Send a file to the specified channel.
int | BearWare.TeamTalkBase.DoRecvFile (int nChannelID, int nFileID, string szLocalFilePath)
| Download a file from the specified channel.
int | BearWare.TeamTalkBase.DoDeleteFile (int nChannelID, int nFileID)
| Delete a file from a channel.
int | BearWare.TeamTalkBase.DoSubscribe (int nUserID, Subscription uSubscriptions)
| Subscribe to user events and/or data.
int | BearWare.TeamTalkBase.DoUnsubscribe (int nUserID, Subscription uSubscriptions)
| Unsubscribe to user events/data. This can be used to ignore messages or voice data from a specific user.
int | BearWare.TeamTalkBase.DoMakeChannel (Channel lpChannel)
| Make a new channel on the server.
int | BearWare.TeamTalkBase.DoUpdateChannel (Channel lpChannel)
| Update a channel's properties.
int | BearWare.TeamTalkBase.DoRemoveChannel (int nChannelID)
| Remove a channel from a server.
int | BearWare.TeamTalkBase.DoMoveUser (int nUserID, int nChannelID)
| Issue command to move a user from one channel to another.
int | BearWare.TeamTalkBase.DoUpdateServer (ServerProperties lpServerProperties)
| Update server properties.
int | BearWare.TeamTalkBase.DoListUserAccounts (int nIndex, int nCount)
| Issue command to list user accounts on the server.
int | BearWare.TeamTalkBase.DoNewUserAccount (UserAccount lpUserAccount)
| Issue command to create a new user account on the server.
int | BearWare.TeamTalkBase.DoDeleteUserAccount (string szUsername)
| Issue command to delete a user account on the server.
int | BearWare.TeamTalkBase.DoBanUser (int nUserID, int nChannelID)
| Issue a ban command on a user in a specific channel.
int | BearWare.TeamTalkBase.DoBanUserEx (int nUserID, BanType uBanTypes)
| Ban the user with `nUserID` using the ban types specified.
int | BearWare.TeamTalkBase.DoBan (BannedUser lpBannedUser)
| Ban the properties specified in `lpBannedUser`.
int | BearWare.TeamTalkBase.DoBanIPAddress (string szIPAddress, int nChannelID)
| Issue a ban command on an IP-address user.
int | BearWare.TeamTalkBase.DoUnBanUser (string szIPAddress, int nChannelID)
| Unban the user with the specified IP-address.
int | BearWare.TeamTalkBase.DoUnBanUserEx (BannedUser lpBannedUser)
| Unban the properties specified in BearWare.BannedUser.
int | BearWare.TeamTalkBase.DoListBans (int nChannelID, int nIndex, int nCount)
| Issue a command to list the banned users.
int | BearWare.TeamTalkBase.DoSaveConfig ()
| Save the server's current state to its settings file (typically the server's .xml file).
int | BearWare.TeamTalkBase.DoQueryServerStats ()
| Get the server's current statistics.
int | BearWare.TeamTalkBase.DoQuit ()
| Quit from server.

## Detailed Description

This section contains the list of commands which can be issued by the client instance to the server.

# Client/Server Command Processing

Functions with the prefix `Do*` are commands which the client can issue to the server. Every `Do*` function returns a command identifier which can user application can use to check when the server has finished processing the issued command. Once the client receives a response to a command the client instance posts the event TeamTalkBase.OnCmdProcessing() to the user application containing the command identifier and whether the command is being processed or it has completed.

As an example, say the user application wants to issue the TeamTalkBase.DoLogin() command. When the application calls TeamTalkBase.DoLogin() the returned command ID is stored in a variable. The application then waits for the TeamTalkBase.OnCmdProcessing() event to be posted with the stored command ID. The first time TeamTalkBase.OnCmdProcessing() is posted to the user application it is to say that processing has begun. The second time TeamTalkBase.OnCmdProcessing() is called it is to say that the command has completed. In between the command starting and completing several other events may take place. If e.g. the TeamTalkBase.DoLogin() fails the user application would receive the event TeamTalkBase.OnCmdError(). If on the other hand the command was successful all the channels and user would be posted as events to the application before the login-command completed processing.

## Function Documentation

## ◆ DoPing()

int BearWare.TeamTalkBase.DoPing | ( |  | ) |

Ping server and wait for server to reply.

Use this command to check if the server is responding.

If the client instance doesn't ping the server within the timeout specified by `nUserTimeout` in BearWare.ServerProperties, then the server will disconnect the client.

The client instance automatically pings the server at half the time specified by `nUserTimeout` in BearWare.ServerProperties.

BearWare.ClientEvent.CLIENTEVENT_CMD_PROCESSING is posted if server replies.

Returns
  Returns command ID which will be passed in BearWare.ClientEvent.CLIENTEVENT_CMD_PROCESSING event when the server is processing the command. -1 is returned in case of error.

Definition at line 6623 of file TeamTalk.cs.

## ◆ DoLogin()

int BearWare.TeamTalkBase.DoLogin | ( | string | szNickname,
|  | string | szUsername,
|  | string | szPassword )

Same as DologinEx() but without the option to specify `szClientName`. Kept for backwards compatibility.

Parameters

  szNickname | The nickname to use.
  szUsername | The username of the BearWare.UserAccount set up on the server.
  szPassword | The password of the user account on the server. Leave blank if no account is needed on the server.

Returns
  Returns command ID which will be passed in BearWare.ClientEvent.CLIENTEVENT_CMD_PROCESSING event when the server is processing the command. -1 is returned in case of error.

Definition at line 6639 of file TeamTalk.cs.

## ◆ DoLoginEx()

int BearWare.TeamTalkBase.DoLoginEx | ( | string | szNickname,
|  | string | szUsername,
|  | string | szPassword,
|  | string | szClientName )

Logon to a server.

Once connected to a server call this function to logon. If the login is successful #OnCmdMyselfLoggedIn is posted, otherwise #OnCmdError. Once logged on it's not possible to talk to other users until the client instance joins a channel. Call #DoJoinChannel to join a channel.

Possible errors:

- BearWare.ClientError BearWare.ClientError.CMDERR_INCORRECT_CHANNEL_PASSWORD
- BearWare.ClientError BearWare.ClientError.CMDERR_INVALID_ACCOUNT
- BearWare.ClientError BearWare.ClientError.CMDERR_MAX_SERVER_USERS_EXCEEDED
- BearWare.ClientError BearWare.ClientError.CMDERR_SERVER_BANNED
- BearWare.ClientError BearWare.ClientError.CMDERR_ALREADY_LOGGEDIN

Parameters

  szNickname | The nickname to use.
  szUsername | The username of the BearWare.UserAccount set up on the server.
  szPassword | The password of the user account on the server. Leave blank if no account is needed on the server.
  szClientName | The name of the client application used. This is an optional value and can be kept blank.

Returns
  Returns command ID which will be passed in #OnCmdProcessing event when the server is processing the command. -1 is returned in case of error.

See also
  TeamTalkBase.DoJoinChannel
  OnCmdMyselfLoggedIn
  OnCmdError

Definition at line 6673 of file TeamTalk.cs.

## ◆ DoLogout()

int BearWare.TeamTalkBase.DoLogout | ( |  | ) |

Logout of the server.

If successful the event #OnCmdMyselfLoggedOut will be posted.

Possible errors:

- BearWare.ClientError BearWare.ClientError.CMDERR_NOT_LOGGEDIN

Returns
  Returns command ID which will be passed in #OnCmdProcessing event when the server is processing the command. -1 is returned in case of error.

See also
  OnCmdMyselfLoggedOut

Definition at line 6691 of file TeamTalk.cs.

## ◆ DoJoinChannel()

int BearWare.TeamTalkBase.DoJoinChannel | ( | Channel | lpChannel | ) |

Create a new channel and join it.

This function can also be used to join an existing channel and in this case the parameters szTopic and szOpPassword are ignored.

When TeamTalkBase.DoJoinChannel() is used to create channels it works similar to IRC. If the client instance tries to join a channel which does not exist it will be created as a new channel. If the client instance is the last user to leave a channel the channel will be removed on the server.

If the channel is created successfully the event BearWare.ClientEvent.CLIENTEVENT_CMD_CHANNEL_NEW will be sent, followed by BearWare.ClientEvent.CLIENTEVENT_CMD_USER_JOINED.

User rights required:

- BearWare.UserRight.USERRIGHT_CREATE_TEMPORARY_CHANNEL

Possible errors:

- BearWare.ClientError BearWare.ClientError.CMDERR_NOT_LOGGEDIN
- BearWare.ClientError BearWare.ClientError.CMDERR_NOT_AUTHORIZED
- BearWare.ClientError BearWare.ClientError.CMDERR_INCORRECT_CHANNEL_PASSWORD
- BearWare.ClientError BearWare.ClientError.CMDERR_MAX_CHANNEL_USERS_EXCEEDED
- BearWare.ClientError BearWare.ClientError.CMDERR_ALREADY_IN_CHANNEL
- BearWare.ClientError BearWare.ClientError.CMDERR_AUDIOCODEC_BITRATE_LIMIT_EXCEEDED
- BearWare.ClientError BearWare.ClientError.CMDERR_UNKNOWN_AUDIOCODEC If the server doesn't support the audio codec. Introduced in version 4.1.0.1264.

Parameters

  lpChannel | The channel to join or create if it doesn't already exist.

Returns
  Returns command ID which will be passed in #OnCmdProcessing event when the server is processing the command. -1 is returned in case of error.

See also
  DoLeaveChannel
  DoMakeChannel
  OnCmdChannelNew
  OnCmdMyselfJoinedChannel

Definition at line 6734 of file TeamTalk.cs.

## ◆ DoJoinChannelByID()

int BearWare.TeamTalkBase.DoJoinChannelByID | ( | int | nChannelID,
|  | string | szPassword )

Join an existing channel.

This command basically calls #DoJoinChannel but omits the unnecessary parameters for only joining a channel and not creating a new one.

Possible errors:

- BearWare.ClientError BearWare.ClientError.CMDERR_NOT_LOGGEDIN
- BearWare.ClientError BearWare.ClientError.CMDERR_NOT_AUTHORIZED
- BearWare.ClientError BearWare.ClientError.CMDERR_INCORRECT_CHANNEL_PASSWORD
- BearWare.ClientError BearWare.ClientError.CMDERR_MAX_CHANNEL_USERS_EXCEEDED
- BearWare.ClientError BearWare.ClientError.CMDERR_ALREADY_IN_CHANNEL

Parameters

  nChannelID | The ID of the channel to join.
  szPassword | The password for the channel to join.

Returns
  Returns command ID which will be passed in #OnCmdProcessing event when the server is processing the command. -1 is returned in case of error.

See also
  DoLeaveChannel
  DoMakeChannel
  OnCmdChannelNew
  OnCmdMyselfJoinedChannel

Definition at line 6761 of file TeamTalk.cs.

## ◆ DoLeaveChannel()

int BearWare.TeamTalkBase.DoLeaveChannel | ( |  | ) |

Leave the current channel.

Note that #DoLeaveChannel() doesn't take any parameters since a user can only participate in one channel at the time. If command is successful the event #OnCmdUserLeftChannel will be posted.

Possible errors:

- BearWare.ClientError BearWare.ClientError.CMDERR_NOT_LOGGEDIN
- BearWare.ClientError BearWare.ClientError.CMDERR_NOT_AUTHORIZED
- BearWare.ClientError BearWare.ClientError.CMDERR_NOT_IN_CHANNEL
- BearWare.ClientError BearWare.ClientError.CMDERR_CHANNEL_NOT_FOUND

Returns
  Returns command ID which will be passed in #OnCmdProcessing event when the server is processing the command. -1 is returned in case of error.

See also
  DoJoinChannel
  OnCmdMyselfLeftChannel

Definition at line 6784 of file TeamTalk.cs.

## ◆ DoChangeNickname()

int BearWare.TeamTalkBase.DoChangeNickname | ( | string | szNewNick | ) |

Change the client instance's nick name.

The event #OnCmdUserUpdate will be posted if the update was successful.

Command will be rejected if BearWare.UserRight.USERRIGHT_LOCKED_NICKNAME is set.

Possible errors:

- BearWare.ClientError.CMDERR_NOT_LOGGEDIN
- BearWare.ClientError.CMDERR_NOT_AUTHORIZED

Parameters

  szNewNick | is the new nick name to use.

Returns
  Returns command ID which will be passed in #OnCmdProcessing event when the server is processing the command. -1 is returned in case of error.

See also
  OnCmdUserUpdate

Definition at line 6805 of file TeamTalk.cs.

## ◆ DoChangeStatus()

int BearWare.TeamTalkBase.DoChangeStatus | ( | int | nStatusMode,
|  | string | szStatusMessage )

Change the client instance's currect status.

The event #OnCmdUserUpdate will be posted if the update was successful.

Command will be rejected if BearWare.UserRight.USERRIGHT_LOCKED_STATUS is set.

Possible errors:

- BearWare.ClientError.CMDERR_NOT_LOGGEDIN
- BearWare.ClientError.CMDERR_NOT_AUTHORIZED

Parameters

  nStatusMode | The value for the status mode.
  szStatusMessage | The user's message associated with the status mode.

Returns
  Returns command ID which will be passed in #OnCmdProcessing event when the server is processing the command. -1 is returned in case of error.

See also
  OnCmdUserUpdate

Definition at line 6828 of file TeamTalk.cs.

## ◆ DoTextMessage()

int BearWare.TeamTalkBase.DoTextMessage | ( | TextMessage | lpTextMessage | ) |

Send a text message to either a user or a channel.

Can also be a broadcast message which is received by all users on the server. This, however, requires BearWare.UserRight.USERRIGHT_TEXTMESSAGE_BROADCAST.

Possible errors:

- BearWare.ClientError BearWare.ClientError.CMDERR_NOT_LOGGEDIN
- BearWare.ClientError BearWare.ClientError.CMDERR_NOT_AUTHORIZED
- BearWare.ClientError BearWare.ClientError.CMDERR_CHANNEL_NOT_FOUND
- BearWare.ClientError BearWare.ClientError.CMDERR_USER_NOT_FOUND

Parameters

  lpTextMessage | A preallocated text-message struct.

Returns
  Returns command ID which will be passed in #OnCmdProcessing event when the server is processing the command. -1 is returned in case of error.

See also
  UserRight BearWare.UserRight.USERRIGHT_TEXTMESSAGE_BROADCAST

Definition at line 6850 of file TeamTalk.cs.

## ◆ DoChannelOp()

int BearWare.TeamTalkBase.DoChannelOp | ( | int | nUserID,
|  | int | nChannelID,
|  | bool | bMakeOperator )

Make another user operator of a channel.

User rights required:

- BearWare.UserRight.USERRIGHT_OPERATOR_ENABLE

Possible errors:

- BearWare.ClientError BearWare.ClientError.CMDERR_NOT_LOGGEDIN
- BearWare.ClientError BearWare.ClientError.CMDERR_NOT_AUTHORIZED
- BearWare.ClientError BearWare.ClientError.CMDERR_CHANNEL_NOT_FOUND
- BearWare.ClientError BearWare.ClientError.CMDERR_USER_NOT_FOUND

Parameters

  nUserID | The user who should become channel operator.
  nChannelID | The channel where the user should become operator
  bMakeOperator | Whether user should be op'ed or deop'ed

Returns
  Returns command ID which will be passed in #OnCmdProcessing event when the server is processing the command. -1 is returned in case of error.

See also
  DoChannelOpEx

Definition at line 6874 of file TeamTalk.cs.

## ◆ DoChannelOpEx()

int BearWare.TeamTalkBase.DoChannelOpEx | ( | int | nUserID,
|  | int | nChannelID,
|  | string | szOpPassword,
|  | bool | bMakeOperator )

Make another user operator of a channel using the szOpPassword of BearWare.Channel.

Possible errors:

- BearWare.ClientError BearWare.ClientError.CMDERR_NOT_LOGGEDIN
- BearWare.ClientError BearWare.ClientError.CMDERR_NOT_AUTHORIZED
- BearWare.ClientError BearWare.ClientError.CMDERR_CHANNEL_NOT_FOUND
- BearWare.ClientError BearWare.ClientError.CMDERR_USER_NOT_FOUND
- BearWare.ClientError BearWare.ClientError.CMDERR_INCORRECT_OP_PASSWORD

Parameters

  nUserID | The user who should become channel operator.
  nChannelID | The channel where the user should become operator.
  szOpPassword | The szOpPassword of BearWare.Channel.
  bMakeOperator | Whether user should be op'ed or deop'ed.

Returns
  Returns command ID which will be passed in #OnCmdProcessing event when the server is processing the command. -1 is returned in case of error.

See also
  DoChannelOp

Definition at line 6897 of file TeamTalk.cs.

## ◆ DoKickUser()

int BearWare.TeamTalkBase.DoKickUser | ( | int | nUserID,
|  | int | nChannelID )

Kick user from either channel or server.

To ban a user call TeamTalkBase.DoBanUser() before TeamTalkBase.DoKickUser().

User rights required:

- BearWare.UserRight.USERRIGHT_KICK_USERS
- Alternative channel-operator (see TeamTalkBase.DoChannelOp()).

Possible errors:

- BearWare.ClientError BearWare.ClientError.CMDERR_NOT_LOGGEDIN
- BearWare.ClientError BearWare.ClientError.CMDERR_NOT_AUTHORIZED
- BearWare.ClientError BearWare.ClientError.CMDERR_CHANNEL_NOT_FOUND
- BearWare.ClientError BearWare.ClientError.CMDERR_USER_NOT_FOUND

Parameters

  nUserID | The ID of the user to kick.
  nChannelID | The channel where the user shoul be kicked from or specify 0 to kick the user off the server.

Returns
  Returns command ID which will be passed in #OnCmdProcessing event when the server is processing the command. -1 is returned in case of error.

See also
  DoBanUser

Definition at line 6926 of file TeamTalk.cs.

## ◆ DoSendFile()

int BearWare.TeamTalkBase.DoSendFile | ( | int | nChannelID,
|  | string | szLocalFilePath )

Send a file to the specified channel.

If user is logged on as an admin the file can be located in any channel. If the user is not an admin the file must be located in the same channel as the user is currently participating in. The file being uploaded must have a file size which is less than the disk quota of the channel, minus the sum of all the files in the channel. The disk quota of a channel can be obtained in the `nDiskQuota` of the BearWare.Channel struct passed to TeamTalkBase.GetChannel().

User rights required:

- BearWare.UserRight.USERRIGHT_UPLOAD_FILES

Possible errors:

- BearWare.ClientError BearWare.ClientError.CMDERR_NOT_LOGGEDIN
- BearWare.ClientError BearWare.ClientError.CMDERR_NOT_AUTHORIZED
- BearWare.ClientError BearWare.ClientError.CMDERR_MAX_DISKUSAGE_EXCEEDED
- BearWare.ClientError BearWare.ClientError.CMDERR_CHANNEL_NOT_FOUND
- BearWare.ClientError BearWare.ClientError.CMDERR_FILETRANSFER_NOT_FOUND
- BearWare.ClientError BearWare.ClientError.CMDERR_OPENFILE_FAILED
- BearWare.ClientError BearWare.ClientError.CMDERR_FILE_NOT_FOUND
- BearWare.ClientError BearWare.ClientError.CMDERR_FILE_ALREADY_EXISTS
- BearWare.ClientError BearWare.ClientError.CMDERR_FILESHARING_DISABLED

Parameters

  nChannelID | The ID of the channel of where to put the file. Only admins can upload in channel other then their own.
  szLocalFilePath | The path of the file to upload, e.g. C:\myfile.txt.

Returns
  Returns command ID which will be passed in #OnCmdProcessing event when the server is processing the command. -1 is returned in case of error.

See also
  Channel
  GetChannel

Definition at line 6964 of file TeamTalk.cs.

## ◆ DoRecvFile()

int BearWare.TeamTalkBase.DoRecvFile | ( | int | nChannelID,
|  | int | nFileID,
|  | string | szLocalFilePath )

Download a file from the specified channel.

If user is logged on as an admin the file can be located in any channel. If the user is not an admin the file must be located in the same channel as the user is currently participating in.

User rights required:

- BearWare.UserRight.USERRIGHT_DOWNLOAD_FILES

Possible errors:

- BearWare.ClientError BearWare.ClientError.CMDERR_NOT_LOGGEDIN
- BearWare.ClientError BearWare.ClientError.CMDERR_NOT_AUTHORIZED
- BearWare.ClientError BearWare.ClientError.CMDERR_CHANNEL_NOT_FOUND
- BearWare.ClientError BearWare.ClientError.CMDERR_FILETRANSFER_NOT_FOUND
- BearWare.ClientError BearWare.ClientError.CMDERR_OPENFILE_FAILED
- BearWare.ClientError BearWare.ClientError.CMDERR_FILE_NOT_FOUND
- BearWare.ClientError BearWare.ClientError.CMDERR_FILESHARING_DISABLED

Parameters

  nChannelID | The ID of the channel of where to get the file. Only admins can download in channel other then their own.
  nFileID | The ID of the file which is passed by #OnCmdFileNew.
  szLocalFilePath | The path of where to store the file, e.g. C:\myfile.txt.

Returns
  Returns command ID which will be passed in #OnCmdProcessing event when the server is processing the command. -1 is returned in case of error.

See also
  OnCmdFileNew
  GetChannelFiles

Definition at line 6997 of file TeamTalk.cs.

## ◆ DoDeleteFile()

int BearWare.TeamTalkBase.DoDeleteFile | ( | int | nChannelID,
|  | int | nFileID )

Delete a file from a channel.

A user is allowed to delete a file from a channel if either the user is an admin, operator of the channel or owner of the file. To be owner of the file a user must have a BearWare.UserAccount on the server.

Possible errors:

- BearWare.ClientError BearWare.ClientError.CMDERR_NOT_LOGGEDIN
- BearWare.ClientError BearWare.ClientError.CMDERR_NOT_AUTHORIZED
- BearWare.ClientError BearWare.ClientError.CMDERR_CHANNEL_NOT_FOUND
- BearWare.ClientError BearWare.ClientError.CMDERR_FILE_NOT_FOUND

Parameters

  nChannelID | The ID of the channel where the file is located.
  nFileID | The ID of the file to delete. The ID of the file which is passed by #OnCmdFileNew.

Returns
  Returns command ID which will be passed in #OnCmdProcessing event when the server is processing the command. -1 is returned in case of error.

See also
  OnCmdFileNew
  GetChannelFiles

Definition at line 7023 of file TeamTalk.cs.

## ◆ DoSubscribe()

int BearWare.TeamTalkBase.DoSubscribe | ( | int | nUserID,
|  | Subscription | uSubscriptions )

Subscribe to user events and/or data.

Possible errors:

- BearWare.ClientError BearWare.ClientError.CMDERR_NOT_LOGGEDIN
- BearWare.ClientError BearWare.ClientError.CMDERR_NOT_AUTHORIZED
- BearWare.ClientError BearWare.ClientError.CMDERR_USER_NOT_FOUND

Parameters

  nUserID | The ID of the user this should affect.
  uSubscriptions | Union of BearWare.Subscription to subscribe to.

Returns
  Returns command ID which will be passed in #OnCmdProcessing event when the server is processing the command. -1 is returned in case of error.

See also
  Subscription

Definition at line 7041 of file TeamTalk.cs.

## ◆ DoUnsubscribe()

int BearWare.TeamTalkBase.DoUnsubscribe | ( | int | nUserID,
|  | Subscription | uSubscriptions )

Unsubscribe to user events/data. This can be used to ignore messages or voice data from a specific user.

Possible errors:

- BearWare.ClientError BearWare.ClientError.CMDERR_NOT_LOGGEDIN
- BearWare.ClientError BearWare.ClientError.CMDERR_NOT_AUTHORIZED
- BearWare.ClientError BearWare.ClientError.CMDERR_USER_NOT_FOUND

Parameters

  nUserID | The ID of the user this should affect.
  uSubscriptions | Union of BearWare.Subscription to unsubscribe.

Returns
  Returns command ID which will be passed in #OnCmdProcessing event when the server is processing the command. -1 is returned in case of error.

See also
  Subscription

Definition at line 7060 of file TeamTalk.cs.

## ◆ DoMakeChannel()

int BearWare.TeamTalkBase.DoMakeChannel | ( | Channel | lpChannel | ) |

Make a new channel on the server.

This command only applies to users with BearWare.UserRight.USERRIGHT_MODIFY_CHANNELS.

User rights required:

- BearWare.UserRight.USERRIGHT_MODIFY_CHANNELS

Possible errors:

- BearWare.ClientError BearWare.ClientError.CMDERR_NOT_LOGGEDIN
- BearWare.ClientError BearWare.ClientError.CMDERR_NOT_AUTHORIZED
- BearWare.ClientError BearWare.ClientError.CMDERR_CHANNEL_ALREADY_EXISTS
- BearWare.ClientError BearWare.ClientError.CMDERR_CHANNEL_NOT_FOUND If channel's combined path is longer than BearWare.TeamTalkBase.TT_STRLEN.
- BearWare.ClientError BearWare.ClientError.CMDERR_INCORRECT_CHANNEL_PASSWORD If the password is longer than BearWare.TeamTalkBase.TT_STRLEN.
- BearWare.ClientError BearWare.ClientError.CMDERR_UNKNOWN_AUDIOCODEC If the server doesn't support the audio codec. Introduced in version 4.1.0.1264.

Parameters

  lpChannel | A Channel-structure containing information about the channel being created. The Channel's member nChannelID is ignored.

Returns
  Returns command ID which will be passed in #OnCmdProcessing event when the server is processing the command. -1 is returned in case of error.

See also
  DoJoinChannel

Definition at line 7089 of file TeamTalk.cs.

## ◆ DoUpdateChannel()

int BearWare.TeamTalkBase.DoUpdateChannel | ( | Channel | lpChannel | ) |

Update a channel's properties.

Users with BearWare.UserRight.USERRIGHT_MODIFY_CHANNELS can update all properties of a channel.

A user with channel-operator status (see TeamTalkBase.DoChannelOp()) can also update a channel's properties, but is not able to change the following properties:

- `audiocodec`
- `nDiskQuota`
- `nMaxUsers`
- `uChannelType`
  - Cannot modify BearWare.ChannelType.CHANNEL_PERMANENT

Note that a channel's BearWare.AudioCodec cannot be changed if there's currently users in the channel.

Possible errors:

- BearWare.ClientError BearWare.ClientError.CMDERR_NOT_LOGGEDIN
- BearWare.ClientError BearWare.ClientError.CMDERR_NOT_AUTHORIZED
- BearWare.ClientError BearWare.ClientError.CMDERR_CHANNEL_NOT_FOUND
- BearWare.ClientError BearWare.ClientError.CMDERR_CHANNEL_HAS_USERS
- BearWare.ClientError BearWare.ClientError.CMDERR_CHANNEL_ALREADY_EXISTS

Parameters

  lpChannel | A Channel-structure containing information about the channel being modified. The channel member's nParentID and szName are ignored.

Returns
  Returns command ID which will be passed in #OnCmdProcessing event when the server is processing the command. -1 is returned in case of error.

See also
  DoMakeChannel

Definition at line 7125 of file TeamTalk.cs.

## ◆ DoRemoveChannel()

int BearWare.TeamTalkBase.DoRemoveChannel | ( | int | nChannelID | ) |

Remove a channel from a server.

This command only applies to users with BearWare.UserRight.USERRIGHT_MODIFY_CHANNELS.

If there's any users in the channel they will be kicked and subchannels will be deleted as well.

Possible errors:

- BearWare.ClientError BearWare.ClientError.CMDERR_NOT_LOGGEDIN
- BearWare.ClientError BearWare.ClientError.CMDERR_NOT_AUTHORIZED
- BearWare.ClientError BearWare.ClientError.CMDERR_CHANNEL_NOT_FOUND

Parameters

  nChannelID | The ID of the channel to remove.

Returns
  Returns command ID which will be passed in #OnCmdProcessing event when the server is processing the command. -1 is returned in case of error.

See also
  DoMakeChannel

Definition at line 7147 of file TeamTalk.cs.

## ◆ DoMoveUser()

int BearWare.TeamTalkBase.DoMoveUser | ( | int | nUserID,
|  | int | nChannelID )

Issue command to move a user from one channel to another.

User rights required:

- BearWare.UserRight.USERRIGHT_MOVE_USERS

Possible errors:

- BearWare.ClientError BearWare.ClientError.CMDERR_NOT_LOGGEDIN
- BearWare.ClientError BearWare.ClientError.CMDERR_NOT_AUTHORIZED
- BearWare.ClientError BearWare.ClientError.CMDERR_CHANNEL_NOT_FOUND
- BearWare.ClientError BearWare.ClientError.CMDERR_USER_NOT_FOUND

Parameters

  nUserID | User to be moved.
  nChannelID | Channel where user should be put into.

Returns
  Returns command ID which will be passed in #OnCmdProcessing event when the server is processing the command. -1 is returned in case of error.

See also
  DoMoveUserByID

Definition at line 7170 of file TeamTalk.cs.

## ◆ DoUpdateServer()

int BearWare.TeamTalkBase.DoUpdateServer | ( | ServerProperties | lpServerProperties | ) |

Update server properties.

User rights required:

- BearWare.UserRight.USERRIGHT_UPDATE_SERVERPROPERTIES

Possible errors:

- BearWare.ClientError BearWare.ClientError.CMDERR_NOT_LOGGEDIN
- BearWare.ClientError BearWare.ClientError.CMDERR_NOT_AUTHORIZED

Parameters

  lpServerProperties | A structure holding the information to be set on the server.

Returns
  Returns command ID which will be passed in #OnCmdProcessing event when the server is processing the command. -1 is returned in case of error.

See also
  GetServerProperties

Definition at line 7190 of file TeamTalk.cs.

## ◆ DoListUserAccounts()

int BearWare.TeamTalkBase.DoListUserAccounts | ( | int | nIndex,
|  | int | nCount )

Issue command to list user accounts on the server.

The event OnCmdUserAccount() will be posted for every BearWare.UserAccount on the server. Ensure not to list too many many user accounts since this may suspend event handling.

User accounts can be used to create users with different user rights.

Only BearWare.UserType.USERTYPE_ADMIN can issue this command.

Possible errors:

- BearWare.ClientError BearWare.ClientError.CMDERR_NOT_LOGGEDIN
- BearWare.ClientError BearWare.ClientError.CMDERR_NOT_AUTHORIZED

Parameters

  nIndex | Index of first user to display.
  nCount | The number of users to retrieve.

Returns
  Returns command ID which will be passed in #OnCmdProcessing event when the server is processing the command. -1 is returned in case of error.

See also
  UserAccount
  UserType

Definition at line 7218 of file TeamTalk.cs.

## ◆ DoNewUserAccount()

int BearWare.TeamTalkBase.DoNewUserAccount | ( | UserAccount | lpUserAccount | ) |

Issue command to create a new user account on the server.

Check out section User Administration to see how the server handles users.

Only BearWare.UserType.USERTYPE_ADMIN can issue this command.

Possible errors:

- BearWare.ClientError BearWare.ClientError.CMDERR_NOT_LOGGEDIN
- BearWare.ClientError BearWare.ClientError.CMDERR_NOT_AUTHORIZED
- BearWare.ClientError BearWare.ClientError.CMDERR_INVALID_USERNAME

Parameters

  lpUserAccount | The properties of the user account to create.

Returns
  Returns command ID which will be passed in #OnCmdProcessing event when the server is processing the command. -1 is returned in case of error.

See also
  DoListUserAccounts
  DoDeleteUserAccount
  UserAccount
  UserType

Definition at line 7244 of file TeamTalk.cs.

## ◆ DoDeleteUserAccount()

int BearWare.TeamTalkBase.DoDeleteUserAccount | ( | string | szUsername | ) |

Issue command to delete a user account on the server.

Only BearWare.UserType.USERTYPE_ADMIN can issue this command.

Possible errors:

- BearWare.ClientError BearWare.ClientError.CMDERR_NOT_LOGGEDIN
- BearWare.ClientError BearWare.ClientError.CMDERR_NOT_AUTHORIZED
- BearWare.ClientError BearWare.ClientError.CMDERR_ACCOUNT_NOT_FOUND

Parameters

  szUsername | The username of the user account to delete.

Returns
  Returns command ID which will be passed in #OnCmdProcessing event when the server is processing the command. -1 is returned in case of error.

See also
  DoListUserAccounts
  DoNewUserAccount
  BearWare.UserAccount
  BearWare.UserType

Definition at line 7266 of file TeamTalk.cs.

## ◆ DoBanUser()

int BearWare.TeamTalkBase.DoBanUser | ( | int | nUserID,
|  | int | nChannelID )

Issue a ban command on a user in a specific channel.

The ban applies to the user's IP-address. Call TeamTalkBase.DoKickUser() to kick the user off the server.

User rights required:

- BearWare.UserRight.USERRIGHT_BAN_USERS

Possible errors:

- BearWare.ClientError BearWare.ClientError.CMDERR_NOT_LOGGEDIN
- BearWare.ClientError BearWare.ClientError.CMDERR_NOT_AUTHORIZED
- BearWare.ClientError BearWare.ClientError.CMDERR_CHANNEL_NOT_FOUND
- BearWare.ClientError BearWare.ClientError.CMDERR_USER_NOT_FOUND

Parameters

  nUserID | The ID of the user to ban.
  nChannelID | Set to 0 to ban from logging in. Otherwise specify user's current channel.

Returns
  Returns command ID which will be passed in #OnCmdProcessing event when the server is processing the command. -1 is returned in case of error.

See also
  DoKickUser()
  DoListBans()
  DoBanIPAddress()
  DoBan()
  DoBanUser()
  DoBanUserEx()

Definition at line 7297 of file TeamTalk.cs.

## ◆ DoBanUserEx()

int BearWare.TeamTalkBase.DoBanUserEx | ( | int | nUserID,
|  | BanType | uBanTypes )

Ban the user with `nUserID` using the ban types specified.

If `uBanTypes` contains BearWare.BanType.BANTYPE_USERNAME then the username cannot join the channel where
nUserID is currently present.

If `uBanTypes` contains BearWare.BanType.BANTYPE_IPADDR then the IP-address cannot join the channel where
nUserID is currently present.

See also
  TeamTalkBase.DoListBans()
  TeamTalkBase.DoBan()

Definition at line 7313 of file TeamTalk.cs.

## ◆ DoBan()

int BearWare.TeamTalkBase.DoBan | ( | BannedUser | lpBannedUser | ) |

Ban the properties specified in `lpBannedUser`.

The `uBanTypes` specifies what the ban applies to. If BearWare.BanType.BANTYPE_CHANNEL is specified in the `uBanTypes` of `lpBannedUser` then the ban applies to joining a channel, DoJoinChannel(). Otherwise the ban applies to login, DoLogin().

If BearWare.BanType.BANTYPE_IPADDR is specified then the IP-address must be set in `szIPAddress` and any IP-address matching will receive BearWare.ClientError.CMDERR_SERVER_BANNED or BearWare.ClientError.CMDERR_CHANNEL_BANNED for TeamTalkBase.DoLogin() or TeamTalkBase.DoJoinChannel(). If instead BearWare.BanType.BANTYPE_USERNAME is specified then `szUsername` must be set and the same rule applies as for IP-addresses.

See also
  TeamTalkBase.DoListBans()
  TeamTalkBase.DoBanUserEx()

Definition at line 7336 of file TeamTalk.cs.

## ◆ DoBanIPAddress()

int BearWare.TeamTalkBase.DoBanIPAddress | ( | string | szIPAddress,
|  | int | nChannelID )

Issue a ban command on an IP-address user.

Same as TeamTalkBase.DoBanUser() except this command applies to IP-addresses and therefore doesn't require a user to be logged in.

User rights required:

- BearWare.UserRight.USERRIGHT_BAN_USERS

Possible errors:

- BearWare.ClientError.CMDERR_NOT_LOGGEDIN
- BearWare.ClientError.CMDERR_NOT_AUTHORIZED

Parameters

  szIPAddress | The IP-address to ban.
  nChannelID | Set to zero.

Returns
  Returns command ID which will be passed in #OnCmdProcessing event when the server is processing the command. -1 is returned in case of error.

See also
  TeamTalkBase.DoKickUser
  TeamTalkBase.DoListBans

Definition at line 7361 of file TeamTalk.cs.

## ◆ DoUnBanUser()

int BearWare.TeamTalkBase.DoUnBanUser | ( | string | szIPAddress,
|  | int | nChannelID )

Unban the user with the specified IP-address.

User rights required:

- BearWare.UserRight.USERRIGHT_BAN_USERS

Possible errors:

- BearWare.ClientError BearWare.ClientError.CMDERR_NOT_LOGGEDIN
- BearWare.ClientError BearWare.ClientError.CMDERR_NOT_AUTHORIZED
- BearWare.ClientError BearWare.ClientError.CMDERR_BAN_NOT_FOUND

Parameters

  szIPAddress | The IP-address to unban.
  nChannelID | Set to zero.

Returns
  Returns command ID which will be passed in #OnCmdProcessing event when the server is processing the command. -1 is returned in case of error.

See also
  DoBanUser
  DoListBans
  DoBanIPAddress

Definition at line 7386 of file TeamTalk.cs.

## ◆ DoUnBanUserEx()

int BearWare.TeamTalkBase.DoUnBanUserEx | ( | BannedUser | lpBannedUser | ) |

Unban the properties specified in BearWare.BannedUser.

The uBanTypes in BearWare.BannedUser determines which properties should have their ban remove. E.g. uBanTypes = BearWare.BanType.BANTYPE_USERNAME and `szUsername` = "guest" will remove all bans where the username is "guest".

See also
  DoBan()

Definition at line 7400 of file TeamTalk.cs.

## ◆ DoListBans()

int BearWare.TeamTalkBase.DoListBans | ( | int | nChannelID,
|  | int | nIndex,
|  | int | nCount )

Issue a command to list the banned users.

The event OnCmdBannedUser() will be posted for every BearWare.BannedUser on the server.

User rights required:

- BearWare.UserRight.USERRIGHT_BAN_USERS

Possible errors:

- BearWare.ClientError BearWare.ClientError.CMDERR_NOT_LOGGEDIN
- BearWare.ClientError BearWare.ClientError.CMDERR_NOT_AUTHORIZED

Parameters

  nChannelID | Set to zero.
  nIndex | Index of first ban to display.
  nCount | The number of bans to display.

Returns
  Returns command ID which will be passed in #OnCmdProcessing event when the server is processing the command. -1 is returned in case of error.

See also
  TeamTalkBase.DoBanUser()

Definition at line 7425 of file TeamTalk.cs.

## ◆ DoSaveConfig()

int BearWare.TeamTalkBase.DoSaveConfig | ( |  | ) |

Save the server's current state to its settings file (typically the server's .xml file).

Only BearWare.UserType.USERTYPE_ADMIN can issue this command.

Note that the server only saves channels with the flag BearWare.ChannelType BearWare.ChannelType.CHANNEL_PERMANENT.

Possible errors:

- BearWare.ClientError BearWare.ClientError.CMDERR_NOT_LOGGEDIN
- BearWare.ClientError BearWare.ClientError.CMDERR_NOT_AUTHORIZED

Returns
  Returns command ID which will be passed in #OnCmdProcessing event when the server is processing the command. -1 is returned in case of error.

See also
  DoUpdateServer

Definition at line 7446 of file TeamTalk.cs.

## ◆ DoQueryServerStats()

int BearWare.TeamTalkBase.DoQueryServerStats | ( |  | ) |

Get the server's current statistics.

Event BearWare.ClientEvent.CLIENTEVENT_CMD_SERVERSTATISTICS will be posted when server has sent response.

Only BearWare.UserType.USERTYPE_ADMIN can issue this command.

Possible errors:

- BearWare.ClientError BearWare.ClientError.CMDERR_NOT_LOGGEDIN
- BearWare.ClientError BearWare.ClientError.CMDERR_NOT_AUTHORIZED
- BearWare.ClientError BearWare.ClientError.CMDERR_UNKNOWN_COMMAND

Returns
  Returns command ID which will be passed in OnCmdProcessing() event when the server is processing the command. -1 is returned in case of error.

Definition at line 7466 of file TeamTalk.cs.

## ◆ DoQuit()

int BearWare.TeamTalkBase.DoQuit | ( |  | ) |

Quit from server.

Possible errors:

- none

This will generate a #OnConnectionLost since the server will drop the client.

Returns
  Returns command ID which will be passed in #OnCmdProcessing event when the server is processing the command. -1 is returned in case of error.

Definition at line 7482 of file TeamTalk.cs.