Module ts3plugin :: Class ts3plugin
[hide private]
[frames] | no frames]

Class ts3plugin

source code

object --+
         |
        ts3plugin

Nested Classes [hide private]
  __metaclass__
Base class for all pyTSon plugins.
Instance Methods [hide private]
 
__init__(self)
Initializes the plugin.
source code
 
stop(self)
This is called, when the plugin is stopped.
source code
 
menuCreated(self)
This is called after the plugin's menuitems are created or the plugin was reactivated.
source code
 
configure(self, qParentWidget)
This is called to show the plugin's configuration ui.
source code
list[str]
infoData(self, schid, aid, atype)
If the classvariable infoTitle is not None, this is called to show information on a treeitem of the TS3 Client.
source code
bool
processCommand(self, schid, command)
If the classvariable commandKeyword is set to a string (non-empty), this is called if the user requests a command by typing /py commandKeyword [args].
source code
bool
onServerErrorEvent(self, schid, errorMessage, error, returnCode, extraMessage)
This is the global error event.
source code
bool
onTextMessageEvent(self, schid, targetMode, toID, fromID, fromName, fromUniqueIdentifier, message, ffIgnored)
This is called when the client receives a textmessage from another client.
source code
bool
onClientPokeEvent(self, schid, fromClientID, pokerName, pokerUniqueIdentity, message, ffIgnored)
This is called when the client is poked by another client.
source code
bool
onServerPermissionErrorEvent(self, schid, errorMessage, error, returnCode, failedPermissionID)
This is the global error event for permission errors.
source code
 
onUserLoggingMessageEvent(self, logMessage, logLevel, logChannel, logID, logTime, completeLogString)
This is called whenever a message is added to the clientlog.
source code
 
onFileTransferStatusEvent(self, transferID, status, statusMessage, remotefileSize, schid)
This is called whenever a filetransfer's status changed.
source code
 
currentServerConnectionChanged(self, serverConnectionHandlerID)
This is called when the current serverconnection changed (the user switched between tabs)
source code
 
onAvatarUpdated(self, serverConnectionHandlerID, clientID, avatarPath)
This is called when a client's avatar changed.
source code
 
onBanListEvent(self, serverConnectionHandlerID, banid, ip, name, uid, creationTime, durationTime, invokerName, invokercldbid, invokeruid, reason, numberOfEnforcements, lastNickName)
This is called for each entry in the server's banlist after it was requested with ts3lib.requestBanList.
source code
 
onChannelClientPermListEvent(self, serverConnectionHandlerID, channelID, clientDatabaseID, permissionID, permissionValue, permissionNegated, permissionSkip)
This is called for each granted permission of a client in a specific channel requested with ts3lib.requestChannelClientPermList.
source code
 
onChannelClientPermListFinishedEvent(self, serverConnectionHandlerID, channelID, clientDatabaseID)
This is called after each permission yielded by onChannelClientPermListEvent was triggered.
source code
 
onChannelDescriptionUpdateEvent(self, serverConnectionHandlerID, channelID)
This is called whenever a channel's description is updated.
source code
 
onChannelGroupListEvent(self, serverConnectionHandlerID, channelGroupID, name, atype, iconID, saveDB)
This is called for each channelgroup on the server requested with ts3lib.requestChannelGroupList.
source code
 
onChannelGroupListFinishedEvent(self, serverConnectionHandlerID)
This is called after each channelgroup yielded by onChannelGroupListEvent was triggered.
source code
 
onChannelGroupPermListEvent(self, serverConnectionHandlerID, channelGroupID, permissionID, permissionValue, permissionNegated, permissionSkip)
This is called for each granted permission assigned to a channelgroup requested with ts3lib.requestChannelGroupPermList.
source code
 
onChannelGroupPermListFinishedEvent(self, serverConnectionHandlerID, channelGroupID)
This is called after each permission yielded by onChannelGroupPermListEvent was triggered.
source code
 
onChannelMoveEvent(self, serverConnectionHandlerID, channelID, newChannelParentID, invokerID, invokerName, invokerUniqueIdentifier)
This is called whenever a channel is moved to a new parent.
source code
 
onChannelPasswordChangedEvent(self, serverConnectionHandlerID, channelID)
This is called whenever a channelpassword is changed.
source code
 
onChannelPermListEvent(self, serverConnectionHandlerID, channelID, permissionID, permissionValue, permissionNegated, permissionSkip)
This is called for each granted permission of a channel requested by ts3lib.requestChannelPermList.
source code
 
onChannelPermListFinishedEvent(self, serverConnectionHandlerID, channelID)
This is called after each permission yielded by onChannelPermListEvent was triggered.
source code
 
onChannelSubscribeEvent(self, serverConnectionHandlerID, channelID)
This is called whenever a channel was subscribed.
source code
 
onChannelSubscribeFinishedEvent(self, serverConnectionHandlerID)
This is called after the subscription on a server has finished (either after subscribing one channel, after all subscriptions of a channel family has been yielded by onChannelSubscribeEvent or after all subscriptions had been reset after connecting).
source code
 
onChannelUnsubscribeEvent(self, serverConnectionHandlerID, channelID)
This is called whenever a channel was unsubscribed.
source code
 
onChannelUnsubscribeFinishedEvent(self, serverConnectionHandlerID)
This is called after the subscription on a server has finished (either after unsubscribing one channel or after all unsubscriptions of a channel family has been yielded by onChannelUnsubscribeEvent).
source code
 
onClientBanFromServerEvent(self, serverConnectionHandlerID, clientID, oldChannelID, newChannelID, visibility, kickerID, kickerName, kickerUniqueIdentifier, time, kickMessage)
This is called after a client was banned from the server.
source code
 
onClientChannelGroupChangedEvent(self, serverConnectionHandlerID, channelGroupID, channelID, clientID, invokerClientID, invokerName, invokerUniqueIdentity)
This is called whenever a client is added to a channelgroup in a specific channel.
source code
 
onClientChatClosedEvent(self, serverConnectionHandlerID, clientID, clientUniqueIdentity)
This is called after a client closed the chat to this client (but only after the other client has sent at least one message).
source code
 
onClientChatComposingEvent(self, serverConnectionHandlerID, clientID, clientUniqueIdentity)
This is called whenever another client sends the chat composing command (either invoked by the sdk with ts3lib.clientChatComposing or when the user is really writing in the chat).
source code
 
onClientDBIDfromUIDEvent(self, serverConnectionHandlerID, uniqueClientIdentifier, clientDatabaseID)
This is called whenever a database id was requested with ts3lib.requestClientDBIDfromUID.
source code
 
onClientDisplayNameChanged(self, serverConnectionHandlerID, clientID, displayName, uniqueClientIdentifier)
This is called whenever a client's displayname changed (nickname or friend/foe manager).
source code
 
onClientIDsEvent(self, serverConnectionHandlerID, uniqueClientIdentifier, clientID, clientName)
This is called for each client matching a specific uid requested by ts3lib.requestClientIDs.
source code
 
onClientIDsFinishedEvent(self, serverConnectionHandlerID)
This is called after each client yielded by onClientIDsEvent was triggered.
source code
 
onClientKickFromChannelEvent(self, serverConnectionHandlerID, clientID, oldChannelID, newChannelID, visibility, kickerID, kickerName, kickerUniqueIdentifier, kickMessage)
This is called whenever a client is kicked from a channel.
source code
 
onClientKickFromServerEvent(self, serverConnectionHandlerID, clientID, oldChannelID, newChannelID, visibility, kickerID, kickerName, kickerUniqueIdentifier, kickMessage)
This is called whenever a client is kicked from the server.
source code
 
onClientMoveEvent(self, serverConnectionHandlerID, clientID, oldChannelID, newChannelID, visibility, moveMessage)
This is called whenever a client enters a another channel (moving, joining or leaving the server).
source code
 
onClientMoveMovedEvent(self, serverConnectionHandlerID, clientID, oldChannelID, newChannelID, visibility, moverID, moverName, moverUniqueIdentifier, moveMessage)
This is called whenever a client is moved to another channel by another client.
source code
 
onClientMoveSubscriptionEvent(self, serverConnectionHandlerID, clientID, oldChannelID, newChannelID, visibility)
This is called whenever a new client enters the view when subscribing a channel.
source code
 
onClientMoveTimeoutEvent(self, serverConnectionHandlerID, clientID, oldChannelID, newChannelID, visibility, timeoutMessage)
This is called when a client timed out.
source code
 
onClientNamefromDBIDEvent(self, serverConnectionHandlerID, uniqueClientIdentifier, clientDatabaseID, clientNickName)
This is called to return the last nickname of a client referenced by the database id after it was requested with ts3lib.requestClientNamefromDBID.
source code
 
onClientNamefromUIDEvent(self, serverConnectionHandlerID, uniqueClientIdentifier, clientDatabaseID, clientNickName)
This is called to return the last nickname of a client referenced by the uid after it was requested with ts3lib.requestClientNamefromUID.
source code
 
onClientNeededPermissionsEvent(self, serverConnectionHandlerID, permissionID, permissionValue)
This is called whenever a permission the TS3 client needed changes.
source code
 
onClientNeededPermissionsFinishedEvent(self, serverConnectionHandlerID)
This is called after each permission yielded by onClientNeededPermissionsEvent was triggered.
source code
 
onClientPermListEvent(self, serverConnectionHandlerID, clientDatabaseID, permissionID, permissionValue, permissionNegated, permissionSkip)
This is called for each granted permission to a specific client requested with ts3lib.requestClientPermList.
source code
 
onClientPermListFinishedEvent(self, serverConnectionHandlerID, clientDatabaseID)
This is called after each permission yielded by onClientPermListEvent was triggered.
source code
 
onClientSelfVariableUpdateEvent(self, serverConnectionHandlerID, flag, oldValue, newValue)
This is called whenever a variable of the own client is changed.
source code
 
onClientServerQueryLoginPasswordEvent(self, serverConnectionHandlerID, loginPassword)
This is called when a new query login was requested.
source code
 
onComplainListEvent(self, serverConnectionHandlerID, targetClientDatabaseID, targetClientNickName, fromClientDatabaseID, fromClientNickName, complainReason, timestamp)
This is called for each entry in the complaintslist.
source code
 
onConnectionInfoEvent(self, serverConnectionHandlerID, clientID)
This is called when the connection info of a client has been updated requested with ts3lib.requestConnectionInfo.
source code
 
onConnectStatusChangeEvent(self, serverConnectionHandlerID, newStatus, errorNumber)
This is called whenever the status of a serverconnection changed.
source code
 
onDelChannelEvent(self, serverConnectionHandlerID, channelID, invokerID, invokerName, invokerUniqueIdentifier)
This is called whenever a channel was deleted.
source code
 
onFileInfoEvent(self, serverConnectionHandlerID, channelID, name, size, datetime)
This is called with the fileinfo of a remote file requested with ts3lib.requestFileInfo.
source code
 
onFileListEvent(self, serverConnectionHandlerID, channelID, path, name, size, datetime, atype, incompletesize, returnCode)
This is called for each file and directory in path requested with ts3lib.requestFileList.
source code
 
onFileListFinishedEvent(self, serverConnectionHandlerID, channelID, path)
This is called after each file and directory yielded by onFileListEvent was triggered.
source code
 
onHotkeyEvent(self, keyword)
This is called when a plugin's hotkey is triggered.
source code
 
onHotkeyRecordedEvent(self, keyword, key)
This is called when a hotkey was recorded requested by ts3lib.requestHotkeyInputDialog.
source code
 
onIncomingClientQueryEvent(self, serverConnectionHandlerID, commandText)
This callback was designed for the clientquery plugin.
source code
 
onMenuItemEvent(self, serverConnectionHandlerID, atype, menuItemID, selectedItemID)
This is called when a plugin's menuitem defined in cls.menuItems is clicked.
source code
 
onMessageGetEvent(self, serverConnectionHandlerID, messageID, fromClientUniqueIdentity, subject, message, timestamp)
This is called with the information about an offline message requested with ts3lib.requestMessageGet.
source code
 
onMessageListEvent(self, serverConnectionHandlerID, messageID, fromClientUniqueIdentity, subject, timestamp, flagRead)
This is called for each offline message available on the server requested with ts3lib.requestMessageList.
source code
 
onNewChannelCreatedEvent(self, serverConnectionHandlerID, channelID, channelParentID, invokerID, invokerName, invokerUniqueIdentifier)
This is called whenever a new channel was created.
source code
 
onNewChannelEvent(self, serverConnectionHandlerID, channelID, channelParentID)
This is called whenever a new channel enters the view (at connect).
source code
 
onPermissionListEvent(self, serverConnectionHandlerID, permissionID, permissionName, permissionDescription)
This is called for each permission on the server requested with ts3lib.requestPermissionList.
source code
 
onPermissionListFinishedEvent(self, serverConnectionHandlerID)
This is called after each permission yielded by onPermissionListEvent was triggered.
source code
 
onPermissionListGroupEndIDEvent(self, serverConnectionHandlerID, groupEndID)
This is called for each last permission in the groups of permissions after requesting the permissionlist with ts3lib.requestPermissionList.
source code
 
onPermissionOverviewEvent(self, serverConnectionHandlerID, clientDatabaseID, channelID, overviewType, overviewID1, overviewID2, permissionID, permissionValue, permissionNegated, permissionSkip)
This is called for each permission of a pair of client and channel requested with ts3lib.requestPermissionOverview.
source code
 
onPermissionOverviewFinishedEvent(self, serverConnectionHandlerID)
This is called after each permission yielded by onPermissionOverviewEvent was triggered.
source code
 
onPlaybackShutdownCompleteEvent(self, serverConnectionHandlerID)
This is called when a playback device can be shutdown with ts3lib.closePlaybackDevice after the process was initiated with ts3lib.initiateGracefulPlaybackShutdown.
source code
 
onPluginCommandEvent(self, serverConnectionHandlerID, sender, pluginCommand)
This is called whenever pyTSon receives a plugincommand from another client.
source code
 
onServerConnectionInfoEvent(self, serverConnectionHandlerID)
This is called whenever the server's connectioninfo was updated.
source code
 
onServerEditedEvent(self, serverConnectionHandlerID, editerID, editerName, editerUniqueIdentifier)
This is called whenever the server was edited by a client.
source code
 
onServerGroupByClientIDEvent(self, serverConnectionHandlerID, name, serverGroupList, clientDatabaseID)
This is called for each servergroup of a client requested with ts3lib.requestServerGroupsByClientID.
source code
 
onServerGroupClientAddedEvent(self, serverConnectionHandlerID, clientID, clientName, clientUniqueIdentity, serverGroupID, invokerClientID, invokerName, invokerUniqueIdentity)
This is called whenever a client is added to a servergroup.
source code
 
onServerGroupClientDeletedEvent(self, serverConnectionHandlerID, clientID, clientName, clientUniqueIdentity, serverGroupID, invokerClientID, invokerName, invokerUniqueIdentity)
This is called whenever a client was removed from a servergroup.
source code
 
onServerGroupClientListEvent(self, serverConnectionHandlerID, serverGroupID, clientDatabaseID, clientNameIdentifier, clientUniqueID)
This is called for each member of a servergroup requested with ts3lib.requestServerGroupClientList.
source code
 
onServerGroupListEvent(self, serverConnectionHandlerID, serverGroupID, name, atype, iconID, saveDB)
This is called for each servergroup on the server requested with ts3lib.requestServerGroupList.
source code
 
onServerGroupListFinishedEvent(self, serverConnectionHandlerID)
This is called after each servergroup yielded by onServerGroupListEvent was triggered.
source code
 
onServerGroupPermListEvent(self, serverConnectionHandlerID, serverGroupID, permissionID, permissionValue, permissionNegated, permissionSkip)
This is called for each granted permission of a servergroup requested with ts3lib.requestServerGroupPermList.
source code
 
onServerGroupPermListFinishedEvent(self, serverConnectionHandlerID, serverGroupID)
This is called after each permission yielded by onServerGroupPermListEvent was triggered.
source code
 
onServerLogEvent(self, serverConnectionHandlerID, logMsg)
This is called for each line of the serverlog requested by the TS3 Client.
source code
 
onServerLogFinishedEvent(self, serverConnectionHandlerID, lastPos, fileSize)
This is called after the requested number of loglines were yielded by onServerLogEvent.
source code
 
onServerStopEvent(self, serverConnectionHandlerID, shutdownMessage)
This is called when the server was stopped.
source code
 
onServerTemporaryPasswordListEvent(self, serverConnectionHandlerID, clientNickname, uniqueClientIdentifier, description, password, timestampStart, timestampEnd, targetChannelID, targetChannelPW)
This is called for each temporary password on the server requested with ts3lib.requestServerTemporaryPasswordList.
source code
 
onServerUpdatedEvent(self, serverConnectionHandlerID)
This is called whenever the server variables were updated.
source code
 
onSoundDeviceListChangedEvent(self, modeID, playOrCap)
This is called when the list of sounddevices changed.
source code
 
onTalkStatusChangeEvent(self, serverConnectionHandlerID, status, isReceivedWhisper, clientID)
This is called whenever a client starts or stops talking.
source code
 
onUpdateChannelEditedEvent(self, serverConnectionHandlerID, channelID, invokerID, invokerName, invokerUniqueIdentifier)
This is called whenever a channel was edited by a client.
source code
 
onUpdateChannelEvent(self, serverConnectionHandlerID, channelID)
This is called whenever the channel variables of a specific channel are updated.
source code
 
onUpdateClientEvent(self, serverConnectionHandlerID, clientID, invokerID, invokerName, invokerUniqueIdentifier)
This is called whenever the client variables of a specific client are updated.
source code

Inherited from object: __delattr__, __format__, __getattribute__, __hash__, __new__, __reduce__, __reduce_ex__, __repr__, __setattr__, __sizeof__, __str__, __subclasshook__

Class Variables [hide private]
  requestAutoload = False
If set to True, the plugin is automatically loaded on startup.
  name = "__ts3plugin__"
The name of the plugin.
  version = "1.0"
Version string of the plugin.
  apiVersion = 21
apiVersion the plugin was developed for.
  author = "Thomas \"PLuS\" Pathmann"
Let the world know who made the plugin.
  description = "This is the baseclass for all ts3 python plugins"
Explain, what the plugin does.
  offersConfigure = False
Set this to True, if the plugin offers a configuration ui.
  commandKeyword = "py"
Set this to a keyword (non-empty) your plugin can be called with.
  infoTitle = "pyTSon"
If set to a string, this title is shown in the info frame of the client on top of the infoData.
  menuItems = [(ts3defines.PluginMenuType.PLUGIN_MENU_TYPE_CLIEN...
List of tuple(int, int, str, str) containing the menuitems.
  hotkeys = [("keyword", "description")]
List of tuple(str, str) containing the hotkeys.
Properties [hide private]

Inherited from object: __class__

Method Details [hide private]

__init__(self)
(Constructor)

source code 

Initializes the plugin. This is called if the plugin is started. After this, the plugin's event-methods will be invoked.

Overrides: object.__init__

stop(self)

source code 

This is called, when the plugin is stopped. After this, event-methods won't be invoked any longer.

menuCreated(self)

source code 

This is called after the plugin's menuitems are created or the plugin was reactivated. Plugin developers can assume, that when this is called, all menuitems are enabled, disable them with ts3lib.setPluginMenuEnabled if necessary.

configure(self, qParentWidget)

source code 

This is called to show the plugin's configuration ui.

Parameters:
  • qParentWidget (pytsonui.ConfigurationDialog) - the reference to pyTSon's configdialog

infoData(self, schid, aid, atype)

source code 

If the classvariable infoTitle is not None, this is called to show information on a treeitem of the TS3 Client.

Parameters:
  • schid (int) - the ID of the serverconnection
  • aid (int) - the id (channel or client id) of the object represented by the treeitem
  • atype (int) - type of the treeitem (see ts3defines.PluginItemType)
Returns: list[str]
list of strings shown in the client (will be joined by a newline)

processCommand(self, schid, command)

source code 

If the classvariable commandKeyword is set to a string (non-empty), this is called if the user requests a command by typing /py commandKeyword [args].

Parameters:
  • schid (int) - the ID of the serverconnection
  • command (str) - the additional arguments passed by the user
Returns: bool
True, if the plugin handled the command, otherwise the user will receive an error

onServerErrorEvent(self, schid, errorMessage, error, returnCode, extraMessage)

source code 

This is the global error event. Independent from the return value, all pyTSon plugins will receive this event.

Parameters:
  • schid (int) - the ID of the serverconnection
  • errorMessage (str) - the message
  • error (int) - the errorcode (see ts3defines.ERROR_*)
  • returnCode (str) - the returnCode of the error passed to the causal method or an empty string, if no returnCode was passed
  • extraMessage (str) - additional error information
Returns: bool
True, if the plugin handled the command, so the client will ignore it. If no returnCode was passed, this return value will be ignored

onTextMessageEvent(self, schid, targetMode, toID, fromID, fromName, fromUniqueIdentifier, message, ffIgnored)

source code 

This is called when the client receives a textmessage from another client. Independent from the return value, all pyTSon plugins will receive this event.

Parameters:
  • schid (int) - the ID of the serverconnection
  • targetMode (int) - the target of the message (see ts3defines.TextMessageTargetMode)
  • toID (int) - the id of the receiver (client or channel)
  • fromID (int) - the client id of the sending client
  • fromName (str) - the current nick of the sending client
  • fromUniqueIdentifier (str) - the uid of the sending client
  • message (str) - the message
  • ffIgnored (int) - if set to a value != 0, the client will ignore this message independent from the return value (eg. the friend/foe manager kicked in)
Returns: bool
True, if the plugin handled the message, so the client will ignore the message

onClientPokeEvent(self, schid, fromClientID, pokerName, pokerUniqueIdentity, message, ffIgnored)

source code 

This is called when the client is poked by another client. Independent from the return value, all pyTSon plugins will receive this event.

Parameters:
  • schid (int) - the ID of the serverconnection
  • fromClientID (int) - the id of the poking client
  • pokerName (str) - the current nick of the poking client
  • pokerUniqueIdentity (str) - the uid of the poking client
  • message (str) - the poke message
  • ffIgnored (int) - if set to a value != 0, the client will ignore this message independent from the return value (eg. the friend/foe manager kicked in)
Returns: bool
True, if the plugin handled the poke, so the client will ignore it

onServerPermissionErrorEvent(self, schid, errorMessage, error, returnCode, failedPermissionID)

source code 

This is the global error event for permission errors. Independent from the return value, all pyTSon plugins will receive this event.

Parameters:
  • schid (int) - the ID of the serverconnection
  • errorMessage (str) - the message
  • error (int) - the errorcode (see ts3defines.ERROR_*)
  • returnCode (str) - the returnCode of the error passed to the causal method or an empty string, if no returnCode was passed
  • failedPermissionID (int) - id of the permission
Returns: bool
True, if the plugin handled the error, so the client will ignore it. If no returnCode was passed, this return value will be ignored

onUserLoggingMessageEvent(self, logMessage, logLevel, logChannel, logID, logTime, completeLogString)

source code 

This is called whenever a message is added to the clientlog. You should not call ts3lib.logMessage in this event to prevent infinite loops. This event can be called asynchronous if called from another thread than the mainthread.

Parameters:
  • logMessage (str) - the message that has been logged
  • logLevel (int) - the level of the message (see ts3defines.LogLevel)
  • logChannel (str) - the logchannel of the message
  • logID (int) - the id of the server connection handler it the message is connected to one, otherwise set to 0
  • logTime (int) - the time of the message as unix timestamp
  • completeLogString (str) - all infos concatenated as string

onFileTransferStatusEvent(self, transferID, status, statusMessage, remotefileSize, schid)

source code 

This is called whenever a filetransfer's status changed. This event is called asynchronous.

Parameters:
  • transferID (int) - the id of the filetransfer
  • status (int) - the new status
  • statusMessage (str) - a statusmessage
  • remotefileSize (int) - size of the file on the remote site (if uploading, this is the incompletefilesize)
  • schid (int) - the ID of the serverconnection

currentServerConnectionChanged(self, serverConnectionHandlerID)

source code 

This is called when the current serverconnection changed (the user switched between tabs)

Parameters:
  • serverConnectionHandlerID (int) - id of the new serverconnectionhandler

onAvatarUpdated(self, serverConnectionHandlerID, clientID, avatarPath)

source code 

This is called when a client's avatar changed.

Parameters:
  • serverConnectionHandlerID (int) - the ID of the serverconnection
  • clientID (int) - the client's id
  • avatarPath (str) - path to the avatar

onBanListEvent(self, serverConnectionHandlerID, banid, ip, name, uid, creationTime, durationTime, invokerName, invokercldbid, invokeruid, reason, numberOfEnforcements, lastNickName)

source code 

This is called for each entry in the server's banlist after it was requested with ts3lib.requestBanList.

Parameters:
  • serverConnectionHandlerID (int) - the ID of the serverconnection
  • banid (int) - id of the ban
  • ip (str) - the banned ip pattern or an empty string
  • name (str) - the banned name pattern or an empty string
  • uid (str) - the banned uid or an empty string
  • creationTime (int) - time the ban was created as unix timestamp
  • durationTime (int) - duration of the ban in seconds
  • invokerName (str) - nick of the creator (at time the ban was created)
  • invokercldbid (int) - database id of the creator
  • invokeruid (str) - uid of the creator
  • reason (str) - reason for ban
  • numberOfEnforcements (int) - number of times, the ban has been enforced since
  • lastNickName (str) - last nickname of the last enforced client

onChannelClientPermListEvent(self, serverConnectionHandlerID, channelID, clientDatabaseID, permissionID, permissionValue, permissionNegated, permissionSkip)

source code 

This is called for each granted permission of a client in a specific channel requested with ts3lib.requestChannelClientPermList.

Parameters:
  • serverConnectionHandlerID (int) - the ID of the serverconnection
  • channelID (int) - id of the channel
  • clientDatabaseID (int) - the client's database id
  • permissionID (int) - id of the permission
  • permissionValue (int) - value of the permission
  • permissionNegated (int) - the negated flag
  • permissionSkip (int) - the skip flag

onChannelClientPermListFinishedEvent(self, serverConnectionHandlerID, channelID, clientDatabaseID)

source code 

This is called after each permission yielded by onChannelClientPermListEvent was triggered.

Parameters:
  • serverConnectionHandlerID (int) - the ID of the serverconnection
  • channelID (int) - id of the channel
  • clientDatabaseID (int) - the client's database id

onChannelDescriptionUpdateEvent(self, serverConnectionHandlerID, channelID)

source code 

This is called whenever a channel's description is updated.

Parameters:
  • serverConnectionHandlerID (int) - the ID of the serverconnection
  • channelID (int) - id of the channel

onChannelGroupListEvent(self, serverConnectionHandlerID, channelGroupID, name, atype, iconID, saveDB)

source code 

This is called for each channelgroup on the server requested with ts3lib.requestChannelGroupList.

Parameters:
  • serverConnectionHandlerID (int) - the ID of the serverconnection
  • channelGroupID (int) - id of the channelgroup
  • name (str) - name of the channelgroup
  • atype (int) - defines if the channelgroup is a templategroup (value==0) or a regular one (value==1)
  • iconID (int) - id of the icon displayed for members or 0 if no icon is displayed
  • saveDB (int) - set to 1 if memberships are saved to the server's database, otherwise set to 0

onChannelGroupListFinishedEvent(self, serverConnectionHandlerID)

source code 

This is called after each channelgroup yielded by onChannelGroupListEvent was triggered.

Parameters:
  • serverConnectionHandlerID (int) - the ID of the serverconnection

onChannelGroupPermListEvent(self, serverConnectionHandlerID, channelGroupID, permissionID, permissionValue, permissionNegated, permissionSkip)

source code 

This is called for each granted permission assigned to a channelgroup requested with ts3lib.requestChannelGroupPermList.

Parameters:
  • serverConnectionHandlerID (int) - the ID of the serverconnection
  • channelGroupID (int) - id of the channelgroup
  • permissionID (int) - id of the permission
  • permissionValue (int) - value of the permission
  • permissionNegated (int) - negated flag of the permission
  • permissionSkip (int) - skip flag of the permission

onChannelGroupPermListFinishedEvent(self, serverConnectionHandlerID, channelGroupID)

source code 

This is called after each permission yielded by onChannelGroupPermListEvent was triggered.

Parameters:
  • serverConnectionHandlerID (int) - the ID of the serverconnection
  • channelGroupID (int) - id of the channelgroup

onChannelMoveEvent(self, serverConnectionHandlerID, channelID, newChannelParentID, invokerID, invokerName, invokerUniqueIdentifier)

source code 

This is called whenever a channel is moved to a new parent. If a channel is moved without changing the parent, onUpdateChannelEditedEvent is called instead.

Parameters:
  • serverConnectionHandlerID (int) - the ID of the serverconnection
  • channelID (int) - id of the moved channel
  • newChannelParentID (int) - id of the new parent channel
  • invokerID (int) - id of the moving client
  • invokerName (str) - nick of the moving client
  • invokerUniqueIdentifier (str) - uid of the moving client

onChannelPasswordChangedEvent(self, serverConnectionHandlerID, channelID)

source code 

This is called whenever a channelpassword is changed.

Parameters:
  • serverConnectionHandlerID (int) - the ID of the serverconnection
  • channelID (int) - if of the channel

onChannelPermListEvent(self, serverConnectionHandlerID, channelID, permissionID, permissionValue, permissionNegated, permissionSkip)

source code 

This is called for each granted permission of a channel requested by ts3lib.requestChannelPermList.

Parameters:
  • serverConnectionHandlerID (int) - the ID of the serverconnection
  • channelID (int) - the id of the channel
  • permissionID (int) - the id of the permission
  • permissionValue (int) - the value of the permission
  • permissionNegated (int) - negated flag of the permission
  • permissionSkip (int) - skip flag of the permission

onChannelPermListFinishedEvent(self, serverConnectionHandlerID, channelID)

source code 

This is called after each permission yielded by onChannelPermListEvent was triggered.

Parameters:
  • serverConnectionHandlerID (int) - the ID of the serverconnection
  • channelID (int) - the id of the channel

onChannelSubscribeEvent(self, serverConnectionHandlerID, channelID)

source code 

This is called whenever a channel was subscribed.

Parameters:
  • serverConnectionHandlerID (int) - the ID of the serverconnection
  • channelID (int) - the id of the channel

onChannelSubscribeFinishedEvent(self, serverConnectionHandlerID)

source code 

This is called after the subscription on a server has finished (either after subscribing one channel, after all subscriptions of a channel family has been yielded by onChannelSubscribeEvent or after all subscriptions had been reset after connecting).

Parameters:
  • serverConnectionHandlerID (int) - the ID of the serverconnection

onChannelUnsubscribeEvent(self, serverConnectionHandlerID, channelID)

source code 

This is called whenever a channel was unsubscribed.

Parameters:
  • serverConnectionHandlerID (int) - the ID of the serverconnection
  • channelID (int) - the id of the channel

onChannelUnsubscribeFinishedEvent(self, serverConnectionHandlerID)

source code 

This is called after the subscription on a server has finished (either after unsubscribing one channel or after all unsubscriptions of a channel family has been yielded by onChannelUnsubscribeEvent).

Parameters:
  • serverConnectionHandlerID (int) - the ID of the serverconnection

onClientBanFromServerEvent(self, serverConnectionHandlerID, clientID, oldChannelID, newChannelID, visibility, kickerID, kickerName, kickerUniqueIdentifier, time, kickMessage)

source code 

This is called after a client was banned from the server.

Parameters:
  • serverConnectionHandlerID (int) - the ID of the serverconnection
  • clientID (int) - the id of the banned client
  • oldChannelID (int) - the id of the last channel, the banned client was in
  • newChannelID (int) - always set to 0
  • visibility (int) - always set to ts3defines.Visibility.LEAVE_VISIBILITY
  • kickerID (int) - id of the banning client
  • kickerName (str) - nick of the banning client
  • kickerUniqueIdentifier (str) - uid of the banning client
  • time (int) - duration of the ban in seconds
  • kickMessage (str) - the kick and ban reason

onClientChannelGroupChangedEvent(self, serverConnectionHandlerID, channelGroupID, channelID, clientID, invokerClientID, invokerName, invokerUniqueIdentity)

source code 

This is called whenever a client is added to a channelgroup in a specific channel.

Parameters:
  • serverConnectionHandlerID (int) - the ID of the serverconnection
  • channelGroupID (int) - the id of the channelgroup
  • channelID (int) - the id of the channel
  • clientID (int) - the id of the client
  • invokerClientID (int) - the id of the client who added the channelgroup or 0 if the server did
  • invokerName (str) - the nick of the client who added the channelgroup or "Server" if the server did
  • invokerUniqueIdentity (str) - uid of the client who added the channelgroup or an empty string if the server did

onClientChatClosedEvent(self, serverConnectionHandlerID, clientID, clientUniqueIdentity)

source code 

This is called after a client closed the chat to this client (but only after the other client has sent at least one message). This is either invoked by the sdk with ts3lib.clientChatClosed or the user has closed the conversation tab).

Parameters:
  • serverConnectionHandlerID (int) - the ID of the serverconnection
  • clientID (int) - the id of the other client
  • clientUniqueIdentity (str) - the uid of the other client

onClientChatComposingEvent(self, serverConnectionHandlerID, clientID, clientUniqueIdentity)

source code 

This is called whenever another client sends the chat composing command (either invoked by the sdk with ts3lib.clientChatComposing or when the user is really writing in the chat).

Parameters:
  • serverConnectionHandlerID (int) - the ID of the serverconnection
  • clientID ()
  • clientUniqueIdentity ()

onClientDBIDfromUIDEvent(self, serverConnectionHandlerID, uniqueClientIdentifier, clientDatabaseID)

source code 

This is called whenever a database id was requested with ts3lib.requestClientDBIDfromUID.

Parameters:
  • serverConnectionHandlerID (int) - the ID of the serverconnection
  • uniqueClientIdentifier (str) - the uid of the requested client
  • clientDatabaseID (int) - the resulting id in the database

onClientDisplayNameChanged(self, serverConnectionHandlerID, clientID, displayName, uniqueClientIdentifier)

source code 

This is called whenever a client's displayname changed (nickname or friend/foe manager).

Parameters:
  • serverConnectionHandlerID (int) - the ID of the serverconnection
  • clientID (int) - the id of the client
  • displayName (str) - the new displayname
  • uniqueClientIdentifier (str) - the uid of the client

onClientIDsEvent(self, serverConnectionHandlerID, uniqueClientIdentifier, clientID, clientName)

source code 

This is called for each client matching a specific uid requested by ts3lib.requestClientIDs.

Parameters:
  • serverConnectionHandlerID (int) - the ID of the serverconnection
  • uniqueClientIdentifier (str) - the uid of the client
  • clientID (int) - the id of a client
  • clientName (str) - the nick of the client

onClientIDsFinishedEvent(self, serverConnectionHandlerID)

source code 

This is called after each client yielded by onClientIDsEvent was triggered.

Parameters:
  • serverConnectionHandlerID (int) - the ID of the serverconnection

onClientKickFromChannelEvent(self, serverConnectionHandlerID, clientID, oldChannelID, newChannelID, visibility, kickerID, kickerName, kickerUniqueIdentifier, kickMessage)

source code 

This is called whenever a client is kicked from a channel.

Parameters:
  • serverConnectionHandlerID (int) - the ID of the serverconnection
  • clientID (int) - the id of the kicked client
  • oldChannelID (int) - the id of the channel the client was kicked from
  • newChannelID (int) - the id of the channel the client was kicked to (the default channel)
  • visibility (int) - defines the new state of the client in the view (see ts3defines.Visibility)
  • kickerID (int) - the id of the kicking client
  • kickerName (str) - the nick of the kicking client
  • kickerUniqueIdentifier (str) - the uid of the kicking client
  • kickMessage (str) - the kick reason

onClientKickFromServerEvent(self, serverConnectionHandlerID, clientID, oldChannelID, newChannelID, visibility, kickerID, kickerName, kickerUniqueIdentifier, kickMessage)

source code 

This is called whenever a client is kicked from the server.

Parameters:
  • serverConnectionHandlerID (int) - the ID of the serverconnection
  • clientID (int) - the id of the kicked client
  • oldChannelID (int) - the id of the channel the client was in
  • newChannelID (int) - always set to 0
  • visibility (int) - always set to ts3defines.Visibility.LEAVE_VISIBILITY
  • kickerID (int) - the id of the kicking client
  • kickerName (str) - nick of the kicking client
  • kickerUniqueIdentifier (str) - uid of the kicking client
  • kickMessage (str) - the kick reason

onClientMoveEvent(self, serverConnectionHandlerID, clientID, oldChannelID, newChannelID, visibility, moveMessage)

source code 

This is called whenever a client enters a another channel (moving, joining or leaving the server).

Parameters:
  • serverConnectionHandlerID (int) - the ID of the serverconnection
  • clientID (int) - the id of the client
  • oldChannelID (int) - the id of the former channel or 0 if the client joined the server
  • newChannelID (int) - the id of the new channel or 0 if the client disconnected
  • visibility (int) - defines the new state of the client in the view (see ts3defines.Visibility)
  • moveMessage (str) - the disconnect message if the client left the server or an empty string

onClientMoveMovedEvent(self, serverConnectionHandlerID, clientID, oldChannelID, newChannelID, visibility, moverID, moverName, moverUniqueIdentifier, moveMessage)

source code 

This is called whenever a client is moved to another channel by another client.

Parameters:
  • serverConnectionHandlerID (int) - the ID of the serverconnection
  • clientID (int) - the id of the moved client
  • oldChannelID (int) - the id of the former channel
  • newChannelID (int) - the id of the new channel
  • visibility (int) - defines the new state of the client in the view (see ts3defines.Visibility)
  • moverID (int) - the id of the moving client
  • moverName (str) - nick of the moving client
  • moverUniqueIdentifier (str) - uid of the moving client
  • moveMessage (str) - always set to an empty string

onClientMoveSubscriptionEvent(self, serverConnectionHandlerID, clientID, oldChannelID, newChannelID, visibility)

source code 

This is called whenever a new client enters the view when subscribing a channel.

Parameters:
  • serverConnectionHandlerID (int) - the ID of the serverconnection
  • clientID (int) - the id of the client
  • oldChannelID (int) - always set to 0
  • newChannelID (int) - the id of the subscribed channel
  • visibility (int) - always set to ts3defines.Visibility.ENTER_VISIBILITY

onClientMoveTimeoutEvent(self, serverConnectionHandlerID, clientID, oldChannelID, newChannelID, visibility, timeoutMessage)

source code 

This is called when a client timed out.

Parameters:
  • serverConnectionHandlerID (int) - the ID of the serverconnection
  • clientID (int) - the id of the client
  • oldChannelID (int) - the id of the channel the client was in
  • newChannelID (int) - always set to 0
  • visibility (int) - always set to ts3defines.Visibility.LEAVE_VISIBILITY
  • timeoutMessage (str) - the timeout message

onClientNamefromDBIDEvent(self, serverConnectionHandlerID, uniqueClientIdentifier, clientDatabaseID, clientNickName)

source code 

This is called to return the last nickname of a client referenced by the database id after it was requested with ts3lib.requestClientNamefromDBID.

Parameters:
  • serverConnectionHandlerID (int) - the ID of the serverconnection
  • uniqueClientIdentifier (str) - the uid of the client
  • clientDatabaseID (int) - the database id of the client
  • clientNickName (str) - the last nickname of the client

onClientNamefromUIDEvent(self, serverConnectionHandlerID, uniqueClientIdentifier, clientDatabaseID, clientNickName)

source code 

This is called to return the last nickname of a client referenced by the uid after it was requested with ts3lib.requestClientNamefromUID.

Parameters:
  • serverConnectionHandlerID (int) - the ID of the serverconnection
  • uniqueClientIdentifier (str) - the uid of the client
  • clientDatabaseID (int) - the database id of the client
  • clientNickName (str) - the last nickname of the client

onClientNeededPermissionsEvent(self, serverConnectionHandlerID, permissionID, permissionValue)

source code 

This is called whenever a permission the TS3 client needed changes.

Parameters:
  • serverConnectionHandlerID (int) - the ID of the serverconnection
  • permissionID (int) - the id of the permission
  • permissionValue (int) - the value of the permission

onClientNeededPermissionsFinishedEvent(self, serverConnectionHandlerID)

source code 

This is called after each permission yielded by onClientNeededPermissionsEvent was triggered.

Parameters:
  • serverConnectionHandlerID (int) - the ID of the serverconnection

onClientPermListEvent(self, serverConnectionHandlerID, clientDatabaseID, permissionID, permissionValue, permissionNegated, permissionSkip)

source code 

This is called for each granted permission to a specific client requested with ts3lib.requestClientPermList.

Parameters:
  • serverConnectionHandlerID (int) - the ID of the serverconnection
  • clientDatabaseID (int) - the database id of the client
  • permissionID (int) - the id of the permission
  • permissionValue (int) - the value of the permission
  • permissionNegated (int) - negated flag of the permission
  • permissionSkip (int) - skip flag of the permission

onClientPermListFinishedEvent(self, serverConnectionHandlerID, clientDatabaseID)

source code 

This is called after each permission yielded by onClientPermListEvent was triggered.

Parameters:
  • serverConnectionHandlerID (int) - the ID of the serverconnection
  • clientDatabaseID (int) - the database id of the client

onClientSelfVariableUpdateEvent(self, serverConnectionHandlerID, flag, oldValue, newValue)

source code 

This is called whenever a variable of the own client is changed.

Parameters:
  • serverConnectionHandlerID (int) - the ID of the serverconnection
  • flag (int) - the changed variable (see ts3defines.ClientProperties and ts3defines.ClientPropertiesRare)
  • oldValue (str) - the former value
  • newValue (str) - the new value

onClientServerQueryLoginPasswordEvent(self, serverConnectionHandlerID, loginPassword)

source code 

This is called when a new query login was requested.

Parameters:
  • serverConnectionHandlerID (int) - the ID of the serverconnection
  • loginPassword (str) - the new password

onComplainListEvent(self, serverConnectionHandlerID, targetClientDatabaseID, targetClientNickName, fromClientDatabaseID, fromClientNickName, complainReason, timestamp)

source code 

This is called for each entry in the complaintslist.

Parameters:
  • serverConnectionHandlerID (int) - the ID of the serverconnection
  • targetClientDatabaseID (int) - the database id of the complained client
  • targetClientNickName (str) - the last nickname of the complained client
  • fromClientDatabaseID (int) - the database id of the complaining client
  • fromClientNickName (str) - the last nickname of the complaining client
  • complainReason (str) - the reason
  • timestamp (int) - the time of the complain as unix timestamp

onConnectionInfoEvent(self, serverConnectionHandlerID, clientID)

source code 

This is called when the connection info of a client has been updated requested with ts3lib.requestConnectionInfo.

Parameters:
  • serverConnectionHandlerID (int) - the ID of the serverconnection
  • clientID (int) - the id of the client

onConnectStatusChangeEvent(self, serverConnectionHandlerID, newStatus, errorNumber)

source code 

This is called whenever the status of a serverconnection changed.

Parameters:
  • serverConnectionHandlerID (int) - the ID of the serverconnection
  • newStatus (int) - the new status (see ts3defines.ConnectStatus)
  • errorNumber (int) - the error (see ts3defines.ERROR_*)

onDelChannelEvent(self, serverConnectionHandlerID, channelID, invokerID, invokerName, invokerUniqueIdentifier)

source code 

This is called whenever a channel was deleted.

Parameters:
  • serverConnectionHandlerID (int) - the ID of the serverconnection
  • channelID (int) - the id of the channel
  • invokerID (int) - the id of the client who deleted the channel
  • invokerName (str) - the nick of the deleting client
  • invokerUniqueIdentifier (str) - the uid of the deleting client

onFileInfoEvent(self, serverConnectionHandlerID, channelID, name, size, datetime)

source code 

This is called with the fileinfo of a remote file requested with ts3lib.requestFileInfo.

Parameters:
  • serverConnectionHandlerID (int) - the ID of the serverconnection
  • channelID (int) - the id of the channel the file is in
  • name (str) - the full path of the file
  • size (int) - the filesize in bytes
  • datetime (int) - time the file was last changed as unix timestamp

onFileListEvent(self, serverConnectionHandlerID, channelID, path, name, size, datetime, atype, incompletesize, returnCode)

source code 

This is called for each file and directory in path requested with ts3lib.requestFileList.

Parameters:
  • serverConnectionHandlerID (int) - the ID of the serverconnection
  • channelID (int) - the id of the channel
  • path (str) - the path
  • name (str) - the filename
  • size (int) - the filesize in bytes
  • datetime () - time the file or directory was last changed as unix timestamp
  • atype (int) - set to 1 if it's a directory, otherwise set to 0
  • incompletesize (int) - the complete filesize in bytes or 0 if the file is already complete
  • returnCode (str) - the returncode passed to the request or an empty string

onFileListFinishedEvent(self, serverConnectionHandlerID, channelID, path)

source code 

This is called after each file and directory yielded by onFileListEvent was triggered.

Parameters:
  • serverConnectionHandlerID (int) - the ID of the serverconnection
  • channelID (int)
  • path ()

onHotkeyEvent(self, keyword)

source code 

This is called when a plugin's hotkey is triggered.

Parameters:
  • keyword (str) - the local keyword set in cls.hotkeys

onHotkeyRecordedEvent(self, keyword, key)

source code 

This is called when a hotkey was recorded requested by ts3lib.requestHotkeyInputDialog.

Parameters:
  • keyword (str) - the keyword
  • key (str) - the hotkey to trigger the keyword

onIncomingClientQueryEvent(self, serverConnectionHandlerID, commandText)

source code 

This callback was designed for the clientquery plugin. It combines many callbacks and is called with a representing string.

Parameters:
  • serverConnectionHandlerID (int) - the ID of the serverconnection
  • commandText (str) - the text of the client query

onMenuItemEvent(self, serverConnectionHandlerID, atype, menuItemID, selectedItemID)

source code 

This is called when a plugin's menuitem defined in cls.menuItems is clicked.

Parameters:
  • serverConnectionHandlerID (int) - the ID of the serverconnection
  • atype (int) - type of the menuitem (see ts3defines.PluginMenuType)
  • menuItemID (int) - the local id of the menuitem defines in cls.menuItems
  • selectedItemID (int) - set to the id of the selected channel if atype is ts3defines.PluginMenuType.PLUGIN_MENU_TYPE_CHANNEL, set to the id of the selected client if atype is ts3defines.PluginMenuType.PLUGIN_MENU_TYPE_CLIENT, otherwise always set to 0

onMessageGetEvent(self, serverConnectionHandlerID, messageID, fromClientUniqueIdentity, subject, message, timestamp)

source code 

This is called with the information about an offline message requested with ts3lib.requestMessageGet.

Parameters:
  • serverConnectionHandlerID (int) - the ID of the serverconnection
  • messageID (int) - the id of the message
  • fromClientUniqueIdentity (str) - the uid of the message's sender
  • subject (str) - the subject of the message
  • message (str) - the content of the message
  • timestamp (int) - time the message was sent as unix timestamp

onMessageListEvent(self, serverConnectionHandlerID, messageID, fromClientUniqueIdentity, subject, timestamp, flagRead)

source code 

This is called for each offline message available on the server requested with ts3lib.requestMessageList.

Parameters:
  • serverConnectionHandlerID (int) - the ID of the serverconnection
  • messageID (int) - the id of the message
  • fromClientUniqueIdentity (str) - the uid of the message's sender
  • subject (str) - the subject of the message
  • timestamp (int) - time the message was sent as unix timestamp
  • flagRead (int) - defines the read status of the message

onNewChannelCreatedEvent(self, serverConnectionHandlerID, channelID, channelParentID, invokerID, invokerName, invokerUniqueIdentifier)

source code 

This is called whenever a new channel was created.

Parameters:
  • serverConnectionHandlerID (int) - the ID of the serverconnection
  • channelID (int) - the id of the new channel
  • channelParentID (int) - the id of the parent channel
  • invokerID (int) - the id of the creating client
  • invokerName (str) - nick of the creating client
  • invokerUniqueIdentifier (str) - the uid of the creating client

onNewChannelEvent(self, serverConnectionHandlerID, channelID, channelParentID)

source code 

This is called whenever a new channel enters the view (at connect).

Parameters:
  • serverConnectionHandlerID (int) - the ID of the serverconnection
  • channelID (int) - the id of the channel
  • channelParentID (int) - the id of the parent channel

onPermissionListEvent(self, serverConnectionHandlerID, permissionID, permissionName, permissionDescription)

source code 

This is called for each permission on the server requested with ts3lib.requestPermissionList.

Parameters:
  • serverConnectionHandlerID (int) - the ID of the serverconnection
  • permissionID (int) - id of the permission
  • permissionName (str) - name of the permission
  • permissionDescription (str) - description of the permission

onPermissionListFinishedEvent(self, serverConnectionHandlerID)

source code 

This is called after each permission yielded by onPermissionListEvent was triggered.

Parameters:
  • serverConnectionHandlerID (int) - the ID of the serverconnection

onPermissionListGroupEndIDEvent(self, serverConnectionHandlerID, groupEndID)

source code 

This is called for each last permission in the groups of permissions after requesting the permissionlist with ts3lib.requestPermissionList.

Parameters:
  • serverConnectionHandlerID (int) - the ID of the serverconnection
  • groupEndID (int) - id of the last permission in group

onPermissionOverviewEvent(self, serverConnectionHandlerID, clientDatabaseID, channelID, overviewType, overviewID1, overviewID2, permissionID, permissionValue, permissionNegated, permissionSkip)

source code 

This is called for each permission of a pair of client and channel requested with ts3lib.requestPermissionOverview.

Parameters:
  • serverConnectionHandlerID (int) - the ID of the serverconnection
  • clientDatabaseID (int) - the database id of the client
  • channelID (int) - the id of the channel
  • overviewType (int) - defines the type of entry in the overview (0 for servergroup, 1 for client permissions, 2 for needed channel permissions, 3 for channelgroup)
  • overviewID1 (int) - depending on the overviewType, set to the id of the servergroup, to the client's database id or the id of the channel
  • overviewID2 (int) - only used with overviewType=3, then set to the id of the channelgroup; otherwise set to 0
  • permissionID (int) - the id of the permission
  • permissionValue (int) - the value of the permission
  • permissionNegated (int) - negated flag of the permission
  • permissionSkip (int) - skip flag of the permission

onPermissionOverviewFinishedEvent(self, serverConnectionHandlerID)

source code 

This is called after each permission yielded by onPermissionOverviewEvent was triggered.

Parameters:
  • serverConnectionHandlerID (int) - the ID of the serverconnection

onPlaybackShutdownCompleteEvent(self, serverConnectionHandlerID)

source code 

This is called when a playback device can be shutdown with ts3lib.closePlaybackDevice after the process was initiated with ts3lib.initiateGracefulPlaybackShutdown.

Parameters:
  • serverConnectionHandlerID (int) - the ID of the serverconnection

onPluginCommandEvent(self, serverConnectionHandlerID, sender, pluginCommand)

source code 

This is called whenever pyTSon receives a plugincommand from another client. All pyTSon plugins will receive this callback. pyTSon recommends to prefix plugincommands with the pluginname.

Parameters:
  • serverConnectionHandlerID (int) - the ID of the serverconnection
  • sender (int) - the id of the sending client
  • pluginCommand (str) - the command

onServerConnectionInfoEvent(self, serverConnectionHandlerID)

source code 

This is called whenever the server's connectioninfo was updated.

Parameters:
  • serverConnectionHandlerID (int) - the ID of the serverconnection

onServerEditedEvent(self, serverConnectionHandlerID, editerID, editerName, editerUniqueIdentifier)

source code 

This is called whenever the server was edited by a client.

Parameters:
  • serverConnectionHandlerID (int) - the ID of the serverconnection
  • editerID (int) - the id of the client
  • editerName (int) - nick of the client
  • editerUniqueIdentifier (str) - uid of the client

onServerGroupByClientIDEvent(self, serverConnectionHandlerID, name, serverGroupList, clientDatabaseID)

source code 

This is called for each servergroup of a client requested with ts3lib.requestServerGroupsByClientID.

Parameters:
  • serverConnectionHandlerID (int) - the ID of the serverconnection
  • name (str) - name of the servergroup
  • serverGroupList (int) - id of the servergroup
  • clientDatabaseID (int) - the database id of the client

onServerGroupClientAddedEvent(self, serverConnectionHandlerID, clientID, clientName, clientUniqueIdentity, serverGroupID, invokerClientID, invokerName, invokerUniqueIdentity)

source code 

This is called whenever a client is added to a servergroup.

Parameters:
  • serverConnectionHandlerID (int) - the ID of the serverconnection
  • clientID (int) - the id of the added client
  • clientName (str) - nick of the added client
  • clientUniqueIdentity (str) - uid of the added client
  • serverGroupID (int) - the id of the servergroup
  • invokerClientID (int) - the id of the adding client
  • invokerName (str) - nick of the adding client
  • invokerUniqueIdentity (str) - uid of the adding client

onServerGroupClientDeletedEvent(self, serverConnectionHandlerID, clientID, clientName, clientUniqueIdentity, serverGroupID, invokerClientID, invokerName, invokerUniqueIdentity)

source code 

This is called whenever a client was removed from a servergroup.

Parameters:
  • serverConnectionHandlerID (int) - the ID of the serverconnection
  • clientID (int) - the id of the removed client
  • clientName (str) - nick of the removed client
  • clientUniqueIdentity (str) - uid of the removed client
  • serverGroupID (int) - id the servergroup
  • invokerClientID (int) - the id of the removing client
  • invokerName (str) - nick of the removing client
  • invokerUniqueIdentity (str) - uid of the removing client

onServerGroupClientListEvent(self, serverConnectionHandlerID, serverGroupID, clientDatabaseID, clientNameIdentifier, clientUniqueID)

source code 

This is called for each member of a servergroup requested with ts3lib.requestServerGroupClientList.

Parameters:
  • serverConnectionHandlerID (int) - the ID of the serverconnection
  • serverGroupID (int) - the id of the servergroup
  • clientDatabaseID (int) - the database id of the member
  • clientNameIdentifier (str) - the last nick of the member or an empty string if withNames was set to False in the request
  • clientUniqueID (str) - the uid of the member or an empty string if withNames was set to False in the request

onServerGroupListEvent(self, serverConnectionHandlerID, serverGroupID, name, atype, iconID, saveDB)

source code 

This is called for each servergroup on the server requested with ts3lib.requestServerGroupList.

Parameters:
  • serverConnectionHandlerID (int) - the ID of the serverconnection
  • serverGroupID (int) - the id of the servergroup
  • name (str) - name of the servergroup
  • atype (int) - type of the servergroup (0=template, 1=regular, 2=serverquery)
  • iconID (int) - icon id of the servergroup or 0 if no icon in this group
  • saveDB (int) - set to 1 if memberships are saved to the database, set to 0 otherwise

onServerGroupListFinishedEvent(self, serverConnectionHandlerID)

source code 

This is called after each servergroup yielded by onServerGroupListEvent was triggered.

Parameters:
  • serverConnectionHandlerID (int) - the ID of the serverconnection

onServerGroupPermListEvent(self, serverConnectionHandlerID, serverGroupID, permissionID, permissionValue, permissionNegated, permissionSkip)

source code 

This is called for each granted permission of a servergroup requested with ts3lib.requestServerGroupPermList.

Parameters:
  • serverConnectionHandlerID (int) - the ID of the serverconnection
  • serverGroupID (int) - the id of the servergroup
  • permissionID (int) - the id of the permission
  • permissionValue (int) - value of the permission
  • permissionNegated (int) - negated flag
  • permissionSkip (int) - skip flag

onServerGroupPermListFinishedEvent(self, serverConnectionHandlerID, serverGroupID)

source code 

This is called after each permission yielded by onServerGroupPermListEvent was triggered.

Parameters:
  • serverConnectionHandlerID (int) - the ID of the serverconnection
  • serverGroupID (int) - id of the servergroup

onServerLogEvent(self, serverConnectionHandlerID, logMsg)

source code 

This is called for each line of the serverlog requested by the TS3 Client.

Parameters:
  • serverConnectionHandlerID (int) - the ID of the serverconnection
  • logMsg (str) - the message

onServerLogFinishedEvent(self, serverConnectionHandlerID, lastPos, fileSize)

source code 

This is called after the requested number of loglines were yielded by onServerLogEvent.

Parameters:
  • serverConnectionHandlerID (int) - the ID of the serverconnection
  • lastPos ()
  • fileSize ()

onServerStopEvent(self, serverConnectionHandlerID, shutdownMessage)

source code 

This is called when the server was stopped.

Parameters:
  • serverConnectionHandlerID (int) - the ID of the serverconnection
  • shutdownMessage (str) - if given, the shutdownmessage

onServerTemporaryPasswordListEvent(self, serverConnectionHandlerID, clientNickname, uniqueClientIdentifier, description, password, timestampStart, timestampEnd, targetChannelID, targetChannelPW)

source code 

This is called for each temporary password on the server requested with ts3lib.requestServerTemporaryPasswordList.

Parameters:
  • serverConnectionHandlerID (int) - the ID of the serverconnection
  • clientNickname (str) - nick of the creator
  • uniqueClientIdentifier (str) - uid of the creator
  • description (str) - description of the password
  • password (str) - the password
  • timestampStart (int) - time the password was created as unix timestamp
  • timestampEnd (int) - time the password expires as unix timestamp
  • targetChannelID (int) - the id of the channel clients join in
  • targetChannelPW (str) - password to the targetChannel

onServerUpdatedEvent(self, serverConnectionHandlerID)

source code 

This is called whenever the server variables were updated.

Parameters:
  • serverConnectionHandlerID (int) - the ID of the serverconnection

onSoundDeviceListChangedEvent(self, modeID, playOrCap)

source code 

This is called when the list of sounddevices changed.

Parameters:
  • modeID (int) - defines the playback/capture mode
  • playOrCap (int) - defines whether the playback- or capturelist changed

onTalkStatusChangeEvent(self, serverConnectionHandlerID, status, isReceivedWhisper, clientID)

source code 

This is called whenever a client starts or stops talking.

Parameters:
  • serverConnectionHandlerID (int) - the ID of the serverconnection
  • status (int) - defines whether the client starts or stops talking (see ts3defines.TalkStatus)
  • isReceivedWhisper (int) - set to 1 if the client whispered, set to 0 otherwise
  • clientID (int) - the id of the client

onUpdateChannelEditedEvent(self, serverConnectionHandlerID, channelID, invokerID, invokerName, invokerUniqueIdentifier)

source code 

This is called whenever a channel was edited by a client.

Parameters:
  • serverConnectionHandlerID (int) - the ID of the serverconnection
  • channelID (int) - the id of the channel
  • invokerID (int) - the id of the client
  • invokerName (str) - nick of the client
  • invokerUniqueIdentifier (str) - uid of the client

onUpdateChannelEvent(self, serverConnectionHandlerID, channelID)

source code 

This is called whenever the channel variables of a specific channel are updated.

Parameters:
  • serverConnectionHandlerID (int) - the ID of the serverconnection
  • channelID (int) - the id of the channel

onUpdateClientEvent(self, serverConnectionHandlerID, clientID, invokerID, invokerName, invokerUniqueIdentifier)

source code 

This is called whenever the client variables of a specific client are updated.

Parameters:
  • serverConnectionHandlerID (int) - the ID of the serverconnection
  • clientID (int) - the id of the client
  • invokerID (int) - id of the client invoking the change or 0 if it was a selfupdate
  • invokerName (str) - nick of the invoking client
  • invokerUniqueIdentifier (str) - uid of the invoking client

Class Variable Details [hide private]

requestAutoload

If set to True, the plugin is automatically loaded on startup. This check is only done once per new plugin, after that users can enable/disable the plugin.

Value:
False

name

The name of the plugin. Use meaningful names. It has to be unique in the list of plugins.

Value:
"__ts3plugin__"

version

Version string of the plugin. pyTSon will use this string to determine, if a new version is available in an online repository.

Value:
"1.0"

offersConfigure

Set this to True, if the plugin offers a configuration ui. In this case the method configure is called.

Value:
False

commandKeyword

Set this to a keyword (non-empty) your plugin can be called with. Users may type /py <thecommand> [moreargs]. The method processCommand will be called with any additional args.

Value:
"py"

infoTitle

If set to a string, this title is shown in the info frame of the client on top of the infoData. If set to None, nothing is shown and infoData won't be called.

Value:
"pyTSon"

menuItems

List of tuple(int, int, str, str) containing the menuitems. The tuple has to contain the type (see ts3defines.PluginMenuType), an int identifier (unique in this list), the title and the name of the icon. The icon has to be a path relative to pytson.getPluginPath(). Pass an empty string to omit using an icon. The method onMenuItemEvent with menuItemID=identifier is called.

Value:
[(ts3defines.PluginMenuType.PLUGIN_MENU_TYPE_CLIENT, 0, "text", "icon.\
png")]

hotkeys

List of tuple(str, str) containing the hotkeys. The tuple has to contain a string identifier (unique in this list) and a description shown in the TS3 Client's hotkey dialog. The method onHotkeyEvent with keyword=identifier is called.

Value:
[("keyword", "description")]