TeamTalk 5 .NET DLL Version 5.15A
|
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. | |
This section contains the list of commands which can be issued by the client instance to the server.
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.
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.
Definition at line 6657 of file TeamTalk.cs.
int BearWare.TeamTalkBase.DoLogin | ( | string | szNickname, |
string | szUsername, | ||
string | szPassword | ||
) |
Same as DologinEx() but without the option to specify szClientName
. Kept for backwards compatibility.
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. |
Definition at line 6673 of file TeamTalk.cs.
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:
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. |
Definition at line 6707 of file TeamTalk.cs.
int BearWare.TeamTalkBase.DoLogout | ( | ) |
Logout of the server.
If successful the event #OnCmdMyselfLoggedOut will be posted.
Possible errors:
Definition at line 6725 of file TeamTalk.cs.
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:
lpChannel | The channel to join or create if it doesn't already exist. |
Definition at line 6768 of file TeamTalk.cs.
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:
nChannelID | The ID of the channel to join. |
szPassword | The password for the channel to join. |
Definition at line 6795 of file TeamTalk.cs.
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:
Definition at line 6818 of file TeamTalk.cs.
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:
szNewNick | is the new nick name to use. |
Definition at line 6839 of file TeamTalk.cs.
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:
nStatusMode | The value for the status mode. |
szStatusMessage | The user's message associated with the status mode. |
Definition at line 6862 of file TeamTalk.cs.
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:
lpTextMessage | A preallocated text-message struct. |
Definition at line 6884 of file TeamTalk.cs.
int BearWare.TeamTalkBase.DoChannelOp | ( | int | nUserID, |
int | nChannelID, | ||
bool | bMakeOperator | ||
) |
Make another user operator of a channel.
User rights required:
Possible errors:
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 |
Definition at line 6908 of file TeamTalk.cs.
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:
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. |
Definition at line 6931 of file TeamTalk.cs.
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:
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. |
Definition at line 6960 of file TeamTalk.cs.
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:
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. |
Definition at line 6998 of file TeamTalk.cs.
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:
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. |
Definition at line 7031 of file TeamTalk.cs.
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:
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. |
Definition at line 7057 of file TeamTalk.cs.
int BearWare.TeamTalkBase.DoSubscribe | ( | int | nUserID, |
Subscription | uSubscriptions | ||
) |
Subscribe to user events and/or data.
Possible errors:
nUserID | The ID of the user this should affect. |
uSubscriptions | Union of BearWare.Subscription to subscribe to. |
Definition at line 7075 of file TeamTalk.cs.
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:
nUserID | The ID of the user this should affect. |
uSubscriptions | Union of BearWare.Subscription to unsubscribe. |
Definition at line 7094 of file TeamTalk.cs.
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:
lpChannel | A Channel-structure containing information about the channel being created. The Channel's member nChannelID is ignored. |
Definition at line 7123 of file TeamTalk.cs.
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
Note that a channel's BearWare.AudioCodec cannot be changed if there's currently users in the channel.
Possible errors:
lpChannel | A Channel-structure containing information about the channel being modified. The channel member's nParentID and szName are ignored. |
Definition at line 7159 of file TeamTalk.cs.
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:
nChannelID | The ID of the channel to remove. |
Definition at line 7181 of file TeamTalk.cs.
int BearWare.TeamTalkBase.DoMoveUser | ( | int | nUserID, |
int | nChannelID | ||
) |
Issue command to move a user from one channel to another.
User rights required:
Possible errors:
nUserID | User to be moved. |
nChannelID | Channel where user should be put into. |
Definition at line 7204 of file TeamTalk.cs.
int BearWare.TeamTalkBase.DoUpdateServer | ( | ServerProperties | lpServerProperties | ) |
Update server properties.
User rights required:
Possible errors:
lpServerProperties | A structure holding the information to be set on the server. |
Definition at line 7224 of file TeamTalk.cs.
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:
nIndex | Index of first user to display. |
nCount | The number of users to retrieve. |
Definition at line 7252 of file TeamTalk.cs.
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:
lpUserAccount | The properties of the user account to create. |
Definition at line 7278 of file TeamTalk.cs.
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:
szUsername | The username of the user account to delete. |
Definition at line 7300 of file TeamTalk.cs.
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:
nUserID | The ID of the user to ban. |
nChannelID | Set to 0 to ban from logging in. Otherwise specify user's current channel. |
Definition at line 7331 of file TeamTalk.cs.
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.
Definition at line 7347 of file TeamTalk.cs.
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.
Definition at line 7370 of file TeamTalk.cs.
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:
szIPAddress | The IP-address to ban. |
nChannelID | Set to zero. |
Definition at line 7395 of file TeamTalk.cs.
int BearWare.TeamTalkBase.DoUnBanUser | ( | string | szIPAddress, |
int | nChannelID | ||
) |
Unban the user with the specified IP-address.
User rights required:
Possible errors:
szIPAddress | The IP-address to unban. |
nChannelID | Set to zero. |
Definition at line 7420 of file TeamTalk.cs.
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".
Definition at line 7434 of file TeamTalk.cs.
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:
nChannelID | Set to zero. |
nIndex | Index of first ban to display. |
nCount | The number of bans to display. |
Definition at line 7459 of file TeamTalk.cs.
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:
Definition at line 7480 of file TeamTalk.cs.
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:
Definition at line 7500 of file TeamTalk.cs.
int BearWare.TeamTalkBase.DoQuit | ( | ) |
Quit from server.
Possible errors:
This will generate a #OnConnectionLost since the server will drop the client.
Definition at line 7516 of file TeamTalk.cs.