TeamTalk 5 .NET DLL Version 5.15A
Loading...
Searching...
No Matches
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 6657 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 BearWare.ClientEvent.CLIENTEVENT_CMD_PROCESSING event when the server is processing the command. -1 is returned in case of error.

Definition at line 6673 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 6707 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 6725 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:

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 6768 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 6795 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 6818 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:

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 6839 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:

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 6862 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:

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 BearWare.UserRight.USERRIGHT_TEXTMESSAGE_BROADCAST

Definition at line 6884 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 6908 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 6931 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 6960 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 6998 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 7031 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 7057 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 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 7075 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 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 7094 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:

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 7123 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:

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 7159 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:

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 7181 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 7204 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 7224 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:

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 7252 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:

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 7278 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:

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 7300 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 7331 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 7347 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 7370 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 7395 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 7420 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 7434 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 7459 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:

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 7480 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:

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 7500 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 7516 of file TeamTalk.cs.