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

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.

ClientEvent.CLIENTEVENT_CMD_PROCESSING is posted if server replies.

Returns
Returns command ID which will be passed in 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
szNicknameThe nickname to use.
szUsernameThe username of the BearWare.UserAccount set up on the server.
szPasswordThe 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 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:

Parameters
szNicknameThe nickname to use.
szUsernameThe username of the BearWare.UserAccount set up on the server.
szPasswordThe password of the user account on the server. Leave blank if no account is needed on the server.
szClientNameThe 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:

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 ClientEvent.CLIENTEVENT_CMD_CHANNEL_NEW will be sent, followed by ClientEvent.CLIENTEVENT_CMD_USER_JOINED.

User rights required:

Possible errors:

Parameters
lpChannelThe 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:

Parameters
nChannelIDThe ID of the channel to join.
szPasswordThe 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:

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 UserRight.USERRIGHT_LOCKED_NICKNAME is set.

Possible errors:

Parameters
szNewNickis 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 UserRight.USERRIGHT_LOCKED_STATUS is set.

Possible errors:

Parameters
nStatusModeThe value for the status mode.
szStatusMessageThe 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 UserRight.USERRIGHT_TEXTMESSAGE_BROADCAST.

Possible errors:

Parameters
lpTextMessageA 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 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:

Possible errors:

Parameters
nUserIDThe user who should become channel operator.
nChannelIDThe channel where the user should become operator
bMakeOperatorWhether 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:

Parameters
nUserIDThe user who should become channel operator.
nChannelIDThe channel where the user should become operator.
szOpPasswordThe szOpPassword of BearWare.Channel.
bMakeOperatorWhether 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:

Possible errors:

Parameters
nUserIDThe ID of the user to kick.
nChannelIDThe 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:

Possible errors:

Parameters
nChannelIDThe ID of the channel of where to put the file. Only admins can upload in channel other then their own.
szLocalFilePathThe 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:

Possible errors:

Parameters
nChannelIDThe ID of the channel of where to get the file. Only admins can download in channel other then their own.
nFileIDThe ID of the file which is passed by OnCmdFileNew.
szLocalFilePathThe 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:

Parameters
nChannelIDThe ID of the channel where the file is located.
nFileIDThe 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:

Parameters
nUserIDThe ID of the user this should affect.
uSubscriptionsUnion of 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:

Parameters
nUserIDThe ID of the user this should affect.
uSubscriptionsUnion of 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 UserRight.USERRIGHT_MODIFY_CHANNELS.

User rights required:

Possible errors:

Parameters
lpChannelA 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 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:

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

Possible errors:

Parameters
lpChannelA 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 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:

Parameters
nChannelIDThe 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:

Possible errors:

Parameters
nUserIDUser to be moved.
nChannelIDChannel 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:

Possible errors:

Parameters
lpServerPropertiesA 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 UserType.USERTYPE_ADMIN can issue this command.

Possible errors:

Parameters
nIndexIndex of first user to display.
nCountThe 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 UserType.USERTYPE_ADMIN can issue this command.

Possible errors:

Parameters
lpUserAccountThe 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 UserType.USERTYPE_ADMIN can issue this command.

Possible errors:

Parameters
szUsernameThe 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:

Possible errors:

Parameters
nUserIDThe ID of the user to ban.
nChannelIDSet 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 BanType.BANTYPE_USERNAME then the username cannot join the channel where
nUserID is currently present.

If uBanTypes contains 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 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 BanType.BANTYPE_IPADDR is specified then the IP-address must be set in szIPAddress and any IP-address matching will receive ClientError.CMDERR_SERVER_BANNED or ClientError.CMDERR_CHANNEL_BANNED for TeamTalkBase.DoLogin() or TeamTalkBase.DoJoinChannel(). If instead 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:

Possible errors:

Parameters
szIPAddressThe IP-address to ban.
nChannelIDSet 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:

Possible errors:

Parameters
szIPAddressThe IP-address to unban.
nChannelIDSet 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 = 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:

Possible errors:

Parameters
nChannelIDSet to zero.
nIndexIndex of first ban to display.
nCountThe 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 UserType.USERTYPE_ADMIN can issue this command.

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

Possible errors:

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 ClientEvent.CLIENTEVENT_CMD_SERVERSTATISTICS will be posted when server has sent response.

Only UserType.USERTYPE_ADMIN can issue this command.

Possible errors:

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.