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

Source Code for Module ts3plugin

   1  # coding: utf-8 
   2   
   3  import ts3defines 
   4  from pluginhost import PluginHost 
   5   
6 -class PluginMount(type):
7 """ 8 Mountpoint for ts3plugins. 9 This class is used as metaclass for ts3plugin-subclasses to autodetect classes and add them to the PluginHost. 10 """ 11
12 - def __init__(cls, name, bases, attrs):
13 super(PluginMount, cls).__init__(name, bases, attrs) 14 if not hasattr(PluginHost, 'plugins'): 15 PluginHost.plugins = {} 16 PluginHost.active = {} 17 else: 18 for a in ['requestAutoload', 'name', 'version', 'apiVersion', 'author', 'description', 'offersConfigure', 'commandKeyword', 'infoTitle', 'menuItems', 'hotkeys']: 19 if not hasattr(cls, a): 20 err = ts3lib.logMessage("Plugin %s not loaded, missing required attribute %s" % (name, a), ts3defines.LogLevel.LogLevel_ERROR, "pyTSon.PluginMount.init", 0) 21 if err != ts3defines.ERROR_ok: 22 print("Plugin %s not loaded, missing required attribute %s" % (name, a)) 23 24 return 25 26 if not cls.name in PluginHost.plugins: 27 PluginHost.plugins[cls.name] = cls 28 else: 29 err = ts3lib.logMessage("Error loading python plugin %s, already registered or a plugin with that name already exist" % cls.name, ts3defines.LogLevel.LogLevel_ERROR, "pyTSon.PluginMount.init", 0) 30 if err != ts3defines.ERROR_ok: 31 print("Error loading python plugin %s, already registered or a plugin with that name already exist" % cls.name)
32 33
34 -class ts3plugin(object):
35 __metaclass__ = PluginMount 36 """ 37 Base class for all pyTSon plugins. Subclass this to receive events from the client. pyTSon will automatically recognize this class on startup or on reload. 38 """ 39 40 requestAutoload = False 41 """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.""" 42 name = "__ts3plugin__" 43 """The name of the plugin. Use meaningful names. It has to be unique in the list of plugins.""" 44 version = "1.0" 45 """Version string of the plugin. pyTSon will use this string to determine, if a new version is available in an online repository.""" 46 apiVersion = 21 47 """apiVersion the plugin was developed for.""" 48 author = "Thomas \"PLuS\" Pathmann" 49 """Let the world know who made the plugin.""" 50 description = "This is the baseclass for all ts3 python plugins" 51 """Explain, what the plugin does.""" 52 offersConfigure = False 53 """Set this to True, if the plugin offers a configuration ui. In this case the method configure is called.""" 54 commandKeyword = "py" 55 """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.""" 56 infoTitle = "pyTSon" 57 """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.""" 58 menuItems = [(ts3defines.PluginMenuType.PLUGIN_MENU_TYPE_CLIENT, 0, "text", "icon.png")] 59 """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.""" 60 hotkeys = [("keyword", "description")] 61 """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.""" 62
63 - def __init__(self):
64 """ 65 Initializes the plugin. This is called if the plugin is started. After this, the plugin's event-methods will be invoked. 66 """
67
68 - def stop(self):
69 """ 70 This is called, when the plugin is stopped. After this, event-methods won't be invoked any longer. 71 """
72
73 - def menuCreated(self):
74 """ 75 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. 76 """
77
78 - def configure(self, qParentWidget):
79 """ 80 This is called to show the plugin's configuration ui. 81 @param qParentWidget: the reference to pyTSon's configdialog 82 @type qParentWidget: pytsonui.ConfigurationDialog 83 """
84
85 - def infoData(self, schid, aid, atype):
86 """ 87 If the classvariable infoTitle is not None, this is called to show information on a treeitem of the TS3 Client. 88 @param schid: the ID of the serverconnection 89 @type schid: int 90 @param aid: the id (channel or client id) of the object represented by the treeitem 91 @type aid: int 92 @param atype: type of the treeitem (see ts3defines.PluginItemType) 93 @type atype: int 94 @return: list of strings shown in the client (will be joined by a newline) 95 @rtype: list[str] 96 """
97
98 - def processCommand(self, schid, command):
99 """ 100 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]. 101 @param schid: the ID of the serverconnection 102 @type schid: int 103 @param command: the additional arguments passed by the user 104 @type command: str 105 @return: True, if the plugin handled the command, otherwise the user will receive an error 106 @rtype: bool 107 """
108
109 - def onServerErrorEvent(self, schid, errorMessage, error, returnCode, extraMessage):
110 """ 111 This is the global error event. Independent from the return value, all pyTSon plugins will receive this event. 112 @param schid: the ID of the serverconnection 113 @type schid: int 114 @param errorMessage: the message 115 @type errorMessage: str 116 @param error: the errorcode (see ts3defines.ERROR_*) 117 @type error: int 118 @param returnCode: the returnCode of the error passed to the causal method or an empty string, if no returnCode was passed 119 @type returnCode: str 120 @param extraMessage: additional error information 121 @type extraMessage: str 122 @return: True, if the plugin handled the command, so the client will ignore it. If no returnCode was passed, this return value will be ignored 123 @rtype: bool 124 """
125
126 - def onTextMessageEvent(self, schid, targetMode, toID, fromID, fromName, fromUniqueIdentifier, message, ffIgnored):
127 """ 128 This is called when the client receives a textmessage from another client. Independent from the return value, all pyTSon plugins will receive this event. 129 @param schid: the ID of the serverconnection 130 @type schid: int 131 @param targetMode: the target of the message (see ts3defines.TextMessageTargetMode) 132 @type targetMode: int 133 @param toID: the id of the receiver (client or channel) 134 @type toID: int 135 @param fromID: the client id of the sending client 136 @type fromID: int 137 @param fromName: the current nick of the sending client 138 @type fromName: str 139 @param fromUniqueIdentifier: the uid of the sending client 140 @type fromUniqueIdentifier: str 141 @param message: the message 142 @type message: str 143 @param ffIgnored: if set to a value != 0, the client will ignore this message independent from the return value (eg. the friend/foe manager kicked in) 144 @type ffIgnored: int 145 @return: True, if the plugin handled the message, so the client will ignore the message 146 @rtype: bool 147 """
148
149 - def onClientPokeEvent(self, schid, fromClientID, pokerName, pokerUniqueIdentity, message, ffIgnored):
150 """ 151 This is called when the client is poked by another client. Independent from the return value, all pyTSon plugins will receive this event. 152 @param schid: the ID of the serverconnection 153 @type schid: int 154 @param fromClientID: the id of the poking client 155 @type fromClientID: int 156 @param pokerName: the current nick of the poking client 157 @type pokerName: str 158 @param pokerUniqueIdentity: the uid of the poking client 159 @type pokerUniqueIdentity: str 160 @param message: the poke message 161 @type message: str 162 @param ffIgnored: if set to a value != 0, the client will ignore this message independent from the return value (eg. the friend/foe manager kicked in) 163 @type ffIgnored: int 164 @return: True, if the plugin handled the poke, so the client will ignore it 165 @rtype: bool 166 """
167
168 - def onServerPermissionErrorEvent(self, schid, errorMessage, error, returnCode, failedPermissionID):
169 """ 170 This is the global error event for permission errors. Independent from the return value, all pyTSon plugins will receive this event. 171 @param schid: the ID of the serverconnection 172 @type schid: int 173 @param errorMessage: the message 174 @type errorMessage: str 175 @param error: the errorcode (see ts3defines.ERROR_*) 176 @type error: int 177 @param returnCode: the returnCode of the error passed to the causal method or an empty string, if no returnCode was passed 178 @type returnCode: str 179 @param failedPermissionID: id of the permission 180 @type failedPermissionID: int 181 @return: True, if the plugin handled the error, so the client will ignore it. If no returnCode was passed, this return value will be ignored 182 @rtype: bool 183 """
184
185 - def onUserLoggingMessageEvent(self, logMessage, logLevel, logChannel, logID, logTime, completeLogString):
186 """ 187 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. 188 @param logMessage: the message that has been logged 189 @type logMessage: str 190 @param logLevel: the level of the message (see ts3defines.LogLevel) 191 @type logLevel: int 192 @param logChannel: the logchannel of the message 193 @type logChannel: str 194 @param logID: the id of the server connection handler it the message is connected to one, otherwise set to 0 195 @type logID: int 196 @param logTime: the time of the message as unix timestamp 197 @type logTime: int 198 @param completeLogString: all infos concatenated as string 199 @type completeLogString: str 200 """
201
202 - def onFileTransferStatusEvent(self, transferID, status, statusMessage, remotefileSize, schid):
203 """ 204 This is called whenever a filetransfer's status changed. This event is called asynchronous. 205 @param transferID: the id of the filetransfer 206 @type transferID: int 207 @param status: the new status 208 @type status: int 209 @param statusMessage: a statusmessage 210 @type statusMessage: str 211 @param remotefileSize: size of the file on the remote site (if uploading, this is the incompletefilesize) 212 @type remotefileSize: int 213 @param schid: the ID of the serverconnection 214 @type schid: int 215 """
216
217 - def currentServerConnectionChanged(self, serverConnectionHandlerID):
218 """ 219 This is called when the current serverconnection changed (the user switched between tabs) 220 @param serverConnectionHandlerID: id of the new serverconnectionhandler 221 @type serverConnectionHandlerID: int 222 """
223
224 - def onAvatarUpdated(self, serverConnectionHandlerID, clientID, avatarPath):
225 """ 226 This is called when a client's avatar changed. 227 @param serverConnectionHandlerID: the ID of the serverconnection 228 @type serverConnectionHandlerID: int 229 @param clientID: the client's id 230 @type clientID: int 231 @param avatarPath: path to the avatar 232 @type avatarPath: str 233 """
234
235 - def onBanListEvent(self, serverConnectionHandlerID, banid, ip, name, uid, creationTime, durationTime, invokerName, invokercldbid, invokeruid, reason, numberOfEnforcements, lastNickName):
236 """ 237 This is called for each entry in the server's banlist after it was requested with ts3lib.requestBanList. 238 @param serverConnectionHandlerID: the ID of the serverconnection 239 @type serverConnectionHandlerID: int 240 @param banid: id of the ban 241 @type banid: int 242 @param ip: the banned ip pattern or an empty string 243 @type ip: str 244 @param name: the banned name pattern or an empty string 245 @type name: str 246 @param uid: the banned uid or an empty string 247 @type uid: str 248 @param creationTime: time the ban was created as unix timestamp 249 @type creationTime: int 250 @param durationTime: duration of the ban in seconds 251 @type durationTime: int 252 @param invokerName: nick of the creator (at time the ban was created) 253 @type invokerName: str 254 @param invokercldbid: database id of the creator 255 @type invokercldbid: int 256 @param invokeruid: uid of the creator 257 @type invokeruid: str 258 @param reason: reason for ban 259 @type reason: str 260 @param numberOfEnforcements: number of times, the ban has been enforced since 261 @type numberOfEnforcements: int 262 @param lastNickName: last nickname of the last enforced client 263 @type lastNickName: str 264 """
265
266 - def onChannelClientPermListEvent(self, serverConnectionHandlerID, channelID, clientDatabaseID, permissionID, permissionValue, permissionNegated, permissionSkip):
267 """ 268 This is called for each granted permission of a client in a specific channel requested with ts3lib.requestChannelClientPermList. 269 @param serverConnectionHandlerID: the ID of the serverconnection 270 @type serverConnectionHandlerID: int 271 @param channelID: id of the channel 272 @type channelID: int 273 @param clientDatabaseID: the client's database id 274 @type clientDatabaseID: int 275 @param permissionID: id of the permission 276 @type permissionID: int 277 @param permissionValue: value of the permission 278 @type permissionValue: int 279 @param permissionNegated: the negated flag 280 @type permissionNegated: int 281 @param permissionSkip: the skip flag 282 @type permissionSkip: int 283 """
284
285 - def onChannelClientPermListFinishedEvent(self, serverConnectionHandlerID, channelID, clientDatabaseID):
286 """ 287 This is called after each permission yielded by onChannelClientPermListEvent was triggered. 288 @param serverConnectionHandlerID: the ID of the serverconnection 289 @type serverConnectionHandlerID: int 290 @param channelID: id of the channel 291 @type channelID: int 292 @param clientDatabaseID: the client's database id 293 @type clientDatabaseID: int 294 """
295
296 - def onChannelDescriptionUpdateEvent(self, serverConnectionHandlerID, channelID):
297 """ 298 This is called whenever a channel's description is updated. 299 @param serverConnectionHandlerID: the ID of the serverconnection 300 @type serverConnectionHandlerID: int 301 @param channelID: id of the channel 302 @type channelID: int 303 """
304
305 - def onChannelGroupListEvent(self, serverConnectionHandlerID, channelGroupID, name, atype, iconID, saveDB):
306 """ 307 This is called for each channelgroup on the server requested with ts3lib.requestChannelGroupList. 308 @param serverConnectionHandlerID: the ID of the serverconnection 309 @type serverConnectionHandlerID: int 310 @param channelGroupID: id of the channelgroup 311 @type channelGroupID: int 312 @param name: name of the channelgroup 313 @type name: str 314 @param atype: defines if the channelgroup is a templategroup (value==0) or a regular one (value==1) 315 @type atype: int 316 @param iconID: id of the icon displayed for members or 0 if no icon is displayed 317 @type iconID: int 318 @param saveDB: set to 1 if memberships are saved to the server's database, otherwise set to 0 319 @type saveDB: int 320 """
321
322 - def onChannelGroupListFinishedEvent(self, serverConnectionHandlerID):
323 """ 324 This is called after each channelgroup yielded by onChannelGroupListEvent was triggered. 325 @param serverConnectionHandlerID: the ID of the serverconnection 326 @type serverConnectionHandlerID: int 327 """
328
329 - def onChannelGroupPermListEvent(self, serverConnectionHandlerID, channelGroupID, permissionID, permissionValue, permissionNegated, permissionSkip):
330 """ 331 This is called for each granted permission assigned to a channelgroup requested with ts3lib.requestChannelGroupPermList. 332 @param serverConnectionHandlerID: the ID of the serverconnection 333 @type serverConnectionHandlerID: int 334 @param channelGroupID: id of the channelgroup 335 @type channelGroupID: int 336 @param permissionID: id of the permission 337 @type permissionID: int 338 @param permissionValue: value of the permission 339 @type permissionValue: int 340 @param permissionNegated: negated flag of the permission 341 @type permissionNegated: int 342 @param permissionSkip: skip flag of the permission 343 @type permissionSkip: int 344 """
345
346 - def onChannelGroupPermListFinishedEvent(self, serverConnectionHandlerID, channelGroupID):
347 """ 348 This is called after each permission yielded by onChannelGroupPermListEvent was triggered. 349 @param serverConnectionHandlerID: the ID of the serverconnection 350 @type serverConnectionHandlerID: int 351 @param channelGroupID: id of the channelgroup 352 @type channelGroupID: int 353 """
354
355 - def onChannelMoveEvent(self, serverConnectionHandlerID, channelID, newChannelParentID, invokerID, invokerName, invokerUniqueIdentifier):
356 """ 357 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. 358 @param serverConnectionHandlerID: the ID of the serverconnection 359 @type serverConnectionHandlerID: int 360 @param channelID: id of the moved channel 361 @type channelID: int 362 @param newChannelParentID: id of the new parent channel 363 @type newChannelParentID: int 364 @param invokerID: id of the moving client 365 @type invokerID: int 366 @param invokerName: nick of the moving client 367 @type invokerName: str 368 @param invokerUniqueIdentifier: uid of the moving client 369 @type invokerUniqueIdentifier: str 370 """
371
372 - def onChannelPasswordChangedEvent(self, serverConnectionHandlerID, channelID):
373 """ 374 This is called whenever a channelpassword is changed. 375 @param serverConnectionHandlerID: the ID of the serverconnection 376 @type serverConnectionHandlerID: int 377 @param channelID: if of the channel 378 @type channelID: int 379 """
380
381 - def onChannelPermListEvent(self, serverConnectionHandlerID, channelID, permissionID, permissionValue, permissionNegated, permissionSkip):
382 """ 383 This is called for each granted permission of a channel requested by ts3lib.requestChannelPermList. 384 @param serverConnectionHandlerID: the ID of the serverconnection 385 @type serverConnectionHandlerID: int 386 @param channelID: the id of the channel 387 @type channelID: int 388 @param permissionID: the id of the permission 389 @type permissionID: int 390 @param permissionValue: the value of the permission 391 @type permissionValue: int 392 @param permissionNegated: negated flag of the permission 393 @type permissionNegated: int 394 @param permissionSkip: skip flag of the permission 395 @type permissionSkip: int 396 """
397
398 - def onChannelPermListFinishedEvent(self, serverConnectionHandlerID, channelID):
399 """ 400 This is called after each permission yielded by onChannelPermListEvent was triggered. 401 @param serverConnectionHandlerID: the ID of the serverconnection 402 @type serverConnectionHandlerID: int 403 @param channelID: the id of the channel 404 @type channelID: int 405 """
406
407 - def onChannelSubscribeEvent(self, serverConnectionHandlerID, channelID):
408 """ 409 This is called whenever a channel was subscribed. 410 @param serverConnectionHandlerID: the ID of the serverconnection 411 @type serverConnectionHandlerID: int 412 @param channelID: the id of the channel 413 @type channelID: int 414 """
415
416 - def onChannelSubscribeFinishedEvent(self, serverConnectionHandlerID):
417 """ 418 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). 419 @param serverConnectionHandlerID: the ID of the serverconnection 420 @type serverConnectionHandlerID: int 421 """
422
423 - def onChannelUnsubscribeEvent(self, serverConnectionHandlerID, channelID):
424 """ 425 This is called whenever a channel was unsubscribed. 426 @param serverConnectionHandlerID: the ID of the serverconnection 427 @type serverConnectionHandlerID: int 428 @param channelID: the id of the channel 429 @type channelID: int 430 """
431
432 - def onChannelUnsubscribeFinishedEvent(self, serverConnectionHandlerID):
433 """ 434 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). 435 @param serverConnectionHandlerID: the ID of the serverconnection 436 @type serverConnectionHandlerID: int 437 """
438
439 - def onClientBanFromServerEvent(self, serverConnectionHandlerID, clientID, oldChannelID, newChannelID, visibility, kickerID, kickerName, kickerUniqueIdentifier, time, kickMessage):
440 """ 441 This is called after a client was banned from the server. 442 @param serverConnectionHandlerID: the ID of the serverconnection 443 @type serverConnectionHandlerID: int 444 @param clientID: the id of the banned client 445 @type clientID: int 446 @param oldChannelID: the id of the last channel, the banned client was in 447 @type oldChannelID: int 448 @param newChannelID: always set to 0 449 @type newChannelID: int 450 @param visibility: always set to ts3defines.Visibility.LEAVE_VISIBILITY 451 @type visibility: int 452 @param kickerID: id of the banning client 453 @type kickerID: int 454 @param kickerName: nick of the banning client 455 @type kickerName: str 456 @param kickerUniqueIdentifier: uid of the banning client 457 @type kickerUniqueIdentifier: str 458 @param time: duration of the ban in seconds 459 @type time: int 460 @param kickMessage: the kick and ban reason 461 @type kickMessage: str 462 """
463
464 - def onClientChannelGroupChangedEvent(self, serverConnectionHandlerID, channelGroupID, channelID, clientID, invokerClientID, invokerName, invokerUniqueIdentity):
465 """ 466 This is called whenever a client is added to a channelgroup in a specific channel. 467 @param serverConnectionHandlerID: the ID of the serverconnection 468 @type serverConnectionHandlerID: int 469 @param channelGroupID: the id of the channelgroup 470 @type channelGroupID: int 471 @param channelID: the id of the channel 472 @type channelID: int 473 @param clientID: the id of the client 474 @type clientID: int 475 @param invokerClientID: the id of the client who added the channelgroup or 0 if the server did 476 @type invokerClientID: int 477 @param invokerName: the nick of the client who added the channelgroup or "Server" if the server did 478 @type invokerName: str 479 @param invokerUniqueIdentity: uid of the client who added the channelgroup or an empty string if the server did 480 @type invokerUniqueIdentity: str 481 """
482
483 - def onClientChatClosedEvent(self, serverConnectionHandlerID, clientID, clientUniqueIdentity):
484 """ 485 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). 486 @param serverConnectionHandlerID: the ID of the serverconnection 487 @type serverConnectionHandlerID: int 488 @param clientID: the id of the other client 489 @type clientID: int 490 @param clientUniqueIdentity: the uid of the other client 491 @type clientUniqueIdentity: str 492 """
493
494 - def onClientChatComposingEvent(self, serverConnectionHandlerID, clientID, clientUniqueIdentity):
495 """ 496 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). 497 @param serverConnectionHandlerID: the ID of the serverconnection 498 @type serverConnectionHandlerID: int 499 @param clientID: 500 @type clientID: 501 @param clientUniqueIdentity: 502 @type clientUniqueIdentity: 503 """
504
505 - def onClientDBIDfromUIDEvent(self, serverConnectionHandlerID, uniqueClientIdentifier, clientDatabaseID):
506 """ 507 This is called whenever a database id was requested with ts3lib.requestClientDBIDfromUID. 508 @param serverConnectionHandlerID: the ID of the serverconnection 509 @type serverConnectionHandlerID: int 510 @param uniqueClientIdentifier: the uid of the requested client 511 @type uniqueClientIdentifier: str 512 @param clientDatabaseID: the resulting id in the database 513 @type clientDatabaseID: int 514 """
515
516 - def onClientDisplayNameChanged(self, serverConnectionHandlerID, clientID, displayName, uniqueClientIdentifier):
517 """ 518 This is called whenever a client's displayname changed (nickname or friend/foe manager). 519 @param serverConnectionHandlerID: the ID of the serverconnection 520 @type serverConnectionHandlerID: int 521 @param clientID: the id of the client 522 @type clientID: int 523 @param displayName: the new displayname 524 @type displayName: str 525 @param uniqueClientIdentifier: the uid of the client 526 @type uniqueClientIdentifier: str 527 """
528
529 - def onClientIDsEvent(self, serverConnectionHandlerID, uniqueClientIdentifier, clientID, clientName):
530 """ 531 This is called for each client matching a specific uid requested by ts3lib.requestClientIDs. 532 @param serverConnectionHandlerID: the ID of the serverconnection 533 @type serverConnectionHandlerID: int 534 @param uniqueClientIdentifier: the uid of the client 535 @type uniqueClientIdentifier: str 536 @param clientID: the id of a client 537 @type clientID: int 538 @param clientName: the nick of the client 539 @type clientName: str 540 """
541
542 - def onClientIDsFinishedEvent(self, serverConnectionHandlerID):
543 """ 544 This is called after each client yielded by onClientIDsEvent was triggered. 545 @param serverConnectionHandlerID: the ID of the serverconnection 546 @type serverConnectionHandlerID: int 547 """
548
549 - def onClientKickFromChannelEvent(self, serverConnectionHandlerID, clientID, oldChannelID, newChannelID, visibility, kickerID, kickerName, kickerUniqueIdentifier, kickMessage):
550 """ 551 This is called whenever a client is kicked from a channel. 552 @param serverConnectionHandlerID: the ID of the serverconnection 553 @type serverConnectionHandlerID: int 554 @param clientID: the id of the kicked client 555 @type clientID: int 556 @param oldChannelID: the id of the channel the client was kicked from 557 @type oldChannelID: int 558 @param newChannelID: the id of the channel the client was kicked to (the default channel) 559 @type newChannelID: int 560 @param visibility: defines the new state of the client in the view (see ts3defines.Visibility) 561 @type visibility: int 562 @param kickerID: the id of the kicking client 563 @type kickerID: int 564 @param kickerName: the nick of the kicking client 565 @type kickerName: str 566 @param kickerUniqueIdentifier: the uid of the kicking client 567 @type kickerUniqueIdentifier: str 568 @param kickMessage: the kick reason 569 @type kickMessage: str 570 """
571
572 - def onClientKickFromServerEvent(self, serverConnectionHandlerID, clientID, oldChannelID, newChannelID, visibility, kickerID, kickerName, kickerUniqueIdentifier, kickMessage):
573 """ 574 This is called whenever a client is kicked from the server. 575 @param serverConnectionHandlerID: the ID of the serverconnection 576 @type serverConnectionHandlerID: int 577 @param clientID: the id of the kicked client 578 @type clientID: int 579 @param oldChannelID: the id of the channel the client was in 580 @type oldChannelID: int 581 @param newChannelID: always set to 0 582 @type newChannelID: int 583 @param visibility: always set to ts3defines.Visibility.LEAVE_VISIBILITY 584 @type visibility: int 585 @param kickerID: the id of the kicking client 586 @type kickerID: int 587 @param kickerName: nick of the kicking client 588 @type kickerName: str 589 @param kickerUniqueIdentifier: uid of the kicking client 590 @type kickerUniqueIdentifier: str 591 @param kickMessage: the kick reason 592 @type kickMessage: str 593 """
594
595 - def onClientMoveEvent(self, serverConnectionHandlerID, clientID, oldChannelID, newChannelID, visibility, moveMessage):
596 """ 597 This is called whenever a client enters a another channel (moving, joining or leaving the server). 598 @param serverConnectionHandlerID: the ID of the serverconnection 599 @type serverConnectionHandlerID: int 600 @param clientID: the id of the client 601 @type clientID: int 602 @param oldChannelID: the id of the former channel or 0 if the client joined the server 603 @type oldChannelID: int 604 @param newChannelID: the id of the new channel or 0 if the client disconnected 605 @type newChannelID: int 606 @param visibility: defines the new state of the client in the view (see ts3defines.Visibility) 607 @type visibility: int 608 @param moveMessage: the disconnect message if the client left the server or an empty string 609 @type moveMessage: str 610 """
611
612 - def onClientMoveMovedEvent(self, serverConnectionHandlerID, clientID, oldChannelID, newChannelID, visibility, moverID, moverName, moverUniqueIdentifier, moveMessage):
613 """ 614 This is called whenever a client is moved to another channel by another client. 615 @param serverConnectionHandlerID: the ID of the serverconnection 616 @type serverConnectionHandlerID: int 617 @param clientID: the id of the moved client 618 @type clientID: int 619 @param oldChannelID: the id of the former channel 620 @type oldChannelID: int 621 @param newChannelID: the id of the new channel 622 @type newChannelID: int 623 @param visibility: defines the new state of the client in the view (see ts3defines.Visibility) 624 @type visibility: int 625 @param moverID: the id of the moving client 626 @type moverID: int 627 @param moverName: nick of the moving client 628 @type moverName: str 629 @param moverUniqueIdentifier: uid of the moving client 630 @type moverUniqueIdentifier: str 631 @param moveMessage: always set to an empty string 632 @type moveMessage: str 633 """
634
635 - def onClientMoveSubscriptionEvent(self, serverConnectionHandlerID, clientID, oldChannelID, newChannelID, visibility):
636 """ 637 This is called whenever a new client enters the view when subscribing a channel. 638 @param serverConnectionHandlerID: the ID of the serverconnection 639 @type serverConnectionHandlerID: int 640 @param clientID: the id of the client 641 @type clientID: int 642 @param oldChannelID: always set to 0 643 @type oldChannelID: int 644 @param newChannelID: the id of the subscribed channel 645 @type newChannelID: int 646 @param visibility: always set to ts3defines.Visibility.ENTER_VISIBILITY 647 @type visibility: int 648 """
649
650 - def onClientMoveTimeoutEvent(self, serverConnectionHandlerID, clientID, oldChannelID, newChannelID, visibility, timeoutMessage):
651 """ 652 This is called when a client timed out. 653 @param serverConnectionHandlerID: the ID of the serverconnection 654 @type serverConnectionHandlerID: int 655 @param clientID: the id of the client 656 @type clientID: int 657 @param oldChannelID: the id of the channel the client was in 658 @type oldChannelID: int 659 @param newChannelID: always set to 0 660 @type newChannelID: int 661 @param visibility: always set to ts3defines.Visibility.LEAVE_VISIBILITY 662 @type visibility: int 663 @param timeoutMessage: the timeout message 664 @type timeoutMessage: str 665 """
666
667 - def onClientNamefromDBIDEvent(self, serverConnectionHandlerID, uniqueClientIdentifier, clientDatabaseID, clientNickName):
668 """ 669 This is called to return the last nickname of a client referenced by the database id after it was requested with ts3lib.requestClientNamefromDBID. 670 @param serverConnectionHandlerID: the ID of the serverconnection 671 @type serverConnectionHandlerID: int 672 @param uniqueClientIdentifier: the uid of the client 673 @type uniqueClientIdentifier: str 674 @param clientDatabaseID: the database id of the client 675 @type clientDatabaseID: int 676 @param clientNickName: the last nickname of the client 677 @type clientNickName: str 678 """
679
680 - def onClientNamefromUIDEvent(self, serverConnectionHandlerID, uniqueClientIdentifier, clientDatabaseID, clientNickName):
681 """ 682 This is called to return the last nickname of a client referenced by the uid after it was requested with ts3lib.requestClientNamefromUID. 683 @param serverConnectionHandlerID: the ID of the serverconnection 684 @type serverConnectionHandlerID: int 685 @param uniqueClientIdentifier: the uid of the client 686 @type uniqueClientIdentifier: str 687 @param clientDatabaseID: the database id of the client 688 @type clientDatabaseID: int 689 @param clientNickName: the last nickname of the client 690 @type clientNickName: str 691 """
692
693 - def onClientNeededPermissionsEvent(self, serverConnectionHandlerID, permissionID, permissionValue):
694 """ 695 This is called whenever a permission the TS3 client needed changes. 696 @param serverConnectionHandlerID: the ID of the serverconnection 697 @type serverConnectionHandlerID: int 698 @param permissionID: the id of the permission 699 @type permissionID: int 700 @param permissionValue: the value of the permission 701 @type permissionValue: int 702 """
703
704 - def onClientNeededPermissionsFinishedEvent(self, serverConnectionHandlerID):
705 """ 706 This is called after each permission yielded by onClientNeededPermissionsEvent was triggered. 707 @param serverConnectionHandlerID: the ID of the serverconnection 708 @type serverConnectionHandlerID: int 709 """
710
711 - def onClientPermListEvent(self, serverConnectionHandlerID, clientDatabaseID, permissionID, permissionValue, permissionNegated, permissionSkip):
712 """ 713 This is called for each granted permission to a specific client requested with ts3lib.requestClientPermList. 714 @param serverConnectionHandlerID: the ID of the serverconnection 715 @type serverConnectionHandlerID: int 716 @param clientDatabaseID: the database id of the client 717 @type clientDatabaseID: int 718 @param permissionID: the id of the permission 719 @type permissionID: int 720 @param permissionValue: the value of the permission 721 @type permissionValue: int 722 @param permissionNegated: negated flag of the permission 723 @type permissionNegated: int 724 @param permissionSkip: skip flag of the permission 725 @type permissionSkip: int 726 """
727
728 - def onClientPermListFinishedEvent(self, serverConnectionHandlerID, clientDatabaseID):
729 """ 730 This is called after each permission yielded by onClientPermListEvent was triggered. 731 @param serverConnectionHandlerID: the ID of the serverconnection 732 @type serverConnectionHandlerID: int 733 @param clientDatabaseID: the database id of the client 734 @type clientDatabaseID: int 735 """
736
737 - def onClientSelfVariableUpdateEvent(self, serverConnectionHandlerID, flag, oldValue, newValue):
738 """ 739 This is called whenever a variable of the own client is changed. 740 @param serverConnectionHandlerID: the ID of the serverconnection 741 @type serverConnectionHandlerID: int 742 @param flag: the changed variable (see ts3defines.ClientProperties and ts3defines.ClientPropertiesRare) 743 @type flag: int 744 @param oldValue: the former value 745 @type oldValue: str 746 @param newValue: the new value 747 @type newValue: str 748 """
749
750 - def onClientServerQueryLoginPasswordEvent(self, serverConnectionHandlerID, loginPassword):
751 """ 752 This is called when a new query login was requested. 753 @param serverConnectionHandlerID: the ID of the serverconnection 754 @type serverConnectionHandlerID: int 755 @param loginPassword: the new password 756 @type loginPassword: str 757 """
758
759 - def onComplainListEvent(self, serverConnectionHandlerID, targetClientDatabaseID, targetClientNickName, fromClientDatabaseID, fromClientNickName, complainReason, timestamp):
760 """ 761 This is called for each entry in the complaintslist. 762 @param serverConnectionHandlerID: the ID of the serverconnection 763 @type serverConnectionHandlerID: int 764 @param targetClientDatabaseID: the database id of the complained client 765 @type targetClientDatabaseID: int 766 @param targetClientNickName: the last nickname of the complained client 767 @type targetClientNickName: str 768 @param fromClientDatabaseID: the database id of the complaining client 769 @type fromClientDatabaseID: int 770 @param fromClientNickName: the last nickname of the complaining client 771 @type fromClientNickName: str 772 @param complainReason: the reason 773 @type complainReason: str 774 @param timestamp: the time of the complain as unix timestamp 775 @type timestamp: int 776 """
777
778 - def onConnectionInfoEvent(self, serverConnectionHandlerID, clientID):
779 """ 780 This is called when the connection info of a client has been updated requested with ts3lib.requestConnectionInfo. 781 @param serverConnectionHandlerID: the ID of the serverconnection 782 @type serverConnectionHandlerID: int 783 @param clientID: the id of the client 784 @type clientID: int 785 """
786
787 - def onConnectStatusChangeEvent(self, serverConnectionHandlerID, newStatus, errorNumber):
788 """ 789 This is called whenever the status of a serverconnection changed. 790 @param serverConnectionHandlerID: the ID of the serverconnection 791 @type serverConnectionHandlerID: int 792 @param newStatus: the new status (see ts3defines.ConnectStatus) 793 @type newStatus: int 794 @param errorNumber: the error (see ts3defines.ERROR_*) 795 @type errorNumber: int 796 """
797
798 - def onDelChannelEvent(self, serverConnectionHandlerID, channelID, invokerID, invokerName, invokerUniqueIdentifier):
799 """ 800 This is called whenever a channel was deleted. 801 @param serverConnectionHandlerID: the ID of the serverconnection 802 @type serverConnectionHandlerID: int 803 @param channelID: the id of the channel 804 @type channelID: int 805 @param invokerID: the id of the client who deleted the channel 806 @type invokerID: int 807 @param invokerName: the nick of the deleting client 808 @type invokerName: str 809 @param invokerUniqueIdentifier: the uid of the deleting client 810 @type invokerUniqueIdentifier: str 811 """
812
813 - def onFileInfoEvent(self, serverConnectionHandlerID, channelID, name, size, datetime):
814 """ 815 This is called with the fileinfo of a remote file requested with ts3lib.requestFileInfo. 816 @param serverConnectionHandlerID: the ID of the serverconnection 817 @type serverConnectionHandlerID: int 818 @param channelID: the id of the channel the file is in 819 @type channelID: int 820 @param name: the full path of the file 821 @type name: str 822 @param size: the filesize in bytes 823 @type size: int 824 @param datetime: time the file was last changed as unix timestamp 825 @type datetime: int 826 """
827
828 - def onFileListEvent(self, serverConnectionHandlerID, channelID, path, name, size, datetime, atype, incompletesize, returnCode):
829 """ 830 This is called for each file and directory in path requested with ts3lib.requestFileList. 831 @param serverConnectionHandlerID: the ID of the serverconnection 832 @type serverConnectionHandlerID: int 833 @param channelID: the id of the channel 834 @type channelID: int 835 @param path: the path 836 @type path: str 837 @param name: the filename 838 @type name: str 839 @param size: the filesize in bytes 840 @type size: int 841 @param datetime: time the file or directory was last changed as unix timestamp 842 @type datetime: 843 @param atype: set to 1 if it's a directory, otherwise set to 0 844 @type atype: int 845 @param incompletesize: the complete filesize in bytes or 0 if the file is already complete 846 @type incompletesize: int 847 @param returnCode: the returncode passed to the request or an empty string 848 @type returnCode: str 849 """
850
851 - def onFileListFinishedEvent(self, serverConnectionHandlerID, channelID, path):
852 """ 853 This is called after each file and directory yielded by onFileListEvent was triggered. 854 @param serverConnectionHandlerID: the ID of the serverconnection 855 @type serverConnectionHandlerID: int 856 @param channelID: 857 @type channelID: int 858 @param path: 859 @type path: 860 """
861
862 - def onHotkeyEvent(self, keyword):
863 """ 864 This is called when a plugin's hotkey is triggered. 865 @param keyword: the local keyword set in cls.hotkeys 866 @type keyword: str 867 """
868
869 - def onHotkeyRecordedEvent(self, keyword, key):
870 """ 871 This is called when a hotkey was recorded requested by ts3lib.requestHotkeyInputDialog. 872 @param keyword: the keyword 873 @type keyword: str 874 @param key: the hotkey to trigger the keyword 875 @type key: str 876 """
877
878 - def onIncomingClientQueryEvent(self, serverConnectionHandlerID, commandText):
879 """ 880 This callback was designed for the clientquery plugin. It combines many callbacks and is called with a representing string. 881 @param serverConnectionHandlerID: the ID of the serverconnection 882 @type serverConnectionHandlerID: int 883 @param commandText: the text of the client query 884 @type commandText: str 885 """
886
887 - def onMenuItemEvent(self, serverConnectionHandlerID, atype, menuItemID, selectedItemID):
888 """ 889 This is called when a plugin's menuitem defined in cls.menuItems is clicked. 890 @param serverConnectionHandlerID: the ID of the serverconnection 891 @type serverConnectionHandlerID: int 892 @param atype: type of the menuitem (see ts3defines.PluginMenuType) 893 @type atype: int 894 @param menuItemID: the local id of the menuitem defines in cls.menuItems 895 @type menuItemID: int 896 @param selectedItemID: 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 897 @type selectedItemID: int 898 """
899
900 - def onMessageGetEvent(self, serverConnectionHandlerID, messageID, fromClientUniqueIdentity, subject, message, timestamp):
901 """ 902 This is called with the information about an offline message requested with ts3lib.requestMessageGet. 903 @param serverConnectionHandlerID: the ID of the serverconnection 904 @type serverConnectionHandlerID: int 905 @param messageID: the id of the message 906 @type messageID: int 907 @param fromClientUniqueIdentity: the uid of the message's sender 908 @type fromClientUniqueIdentity: str 909 @param subject: the subject of the message 910 @type subject: str 911 @param message: the content of the message 912 @type message: str 913 @param timestamp: time the message was sent as unix timestamp 914 @type timestamp: int 915 """
916
917 - def onMessageListEvent(self, serverConnectionHandlerID, messageID, fromClientUniqueIdentity, subject, timestamp, flagRead):
918 """ 919 This is called for each offline message available on the server requested with ts3lib.requestMessageList. 920 @param serverConnectionHandlerID: the ID of the serverconnection 921 @type serverConnectionHandlerID: int 922 @param messageID: the id of the message 923 @type messageID: int 924 @param fromClientUniqueIdentity: the uid of the message's sender 925 @type fromClientUniqueIdentity: str 926 @param subject: the subject of the message 927 @type subject: str 928 @param timestamp: time the message was sent as unix timestamp 929 @type timestamp: int 930 @param flagRead: defines the read status of the message 931 @type flagRead: int 932 """
933
934 - def onNewChannelCreatedEvent(self, serverConnectionHandlerID, channelID, channelParentID, invokerID, invokerName, invokerUniqueIdentifier):
935 """ 936 This is called whenever a new channel was created. 937 @param serverConnectionHandlerID: the ID of the serverconnection 938 @type serverConnectionHandlerID: int 939 @param channelID: the id of the new channel 940 @type channelID: int 941 @param channelParentID: the id of the parent channel 942 @type channelParentID: int 943 @param invokerID: the id of the creating client 944 @type invokerID: int 945 @param invokerName: nick of the creating client 946 @type invokerName: str 947 @param invokerUniqueIdentifier: the uid of the creating client 948 @type invokerUniqueIdentifier: str 949 """
950
951 - def onNewChannelEvent(self, serverConnectionHandlerID, channelID, channelParentID):
952 """ 953 This is called whenever a new channel enters the view (at connect). 954 @param serverConnectionHandlerID: the ID of the serverconnection 955 @type serverConnectionHandlerID: int 956 @param channelID: the id of the channel 957 @type channelID: int 958 @param channelParentID: the id of the parent channel 959 @type channelParentID: int 960 """
961
962 - def onPermissionListEvent(self, serverConnectionHandlerID, permissionID, permissionName, permissionDescription):
963 """ 964 This is called for each permission on the server requested with ts3lib.requestPermissionList. 965 @param serverConnectionHandlerID: the ID of the serverconnection 966 @type serverConnectionHandlerID: int 967 @param permissionID: id of the permission 968 @type permissionID: int 969 @param permissionName: name of the permission 970 @type permissionName: str 971 @param permissionDescription: description of the permission 972 @type permissionDescription: str 973 """
974
975 - def onPermissionListFinishedEvent(self, serverConnectionHandlerID):
976 """ 977 This is called after each permission yielded by onPermissionListEvent was triggered. 978 @param serverConnectionHandlerID: the ID of the serverconnection 979 @type serverConnectionHandlerID: int 980 """
981
982 - def onPermissionListGroupEndIDEvent(self, serverConnectionHandlerID, groupEndID):
983 """ 984 This is called for each last permission in the groups of permissions after requesting the permissionlist with ts3lib.requestPermissionList. 985 @param serverConnectionHandlerID: the ID of the serverconnection 986 @type serverConnectionHandlerID: int 987 @param groupEndID: id of the last permission in group 988 @type groupEndID: int 989 """
990
991 - def onPermissionOverviewEvent(self, serverConnectionHandlerID, clientDatabaseID, channelID, overviewType, overviewID1, overviewID2, permissionID, permissionValue, permissionNegated, permissionSkip):
992 """ 993 This is called for each permission of a pair of client and channel requested with ts3lib.requestPermissionOverview. 994 @param serverConnectionHandlerID: the ID of the serverconnection 995 @type serverConnectionHandlerID: int 996 @param clientDatabaseID: the database id of the client 997 @type clientDatabaseID: int 998 @param channelID: the id of the channel 999 @type channelID: int 1000 @param overviewType: defines the type of entry in the overview (0 for servergroup, 1 for client permissions, 2 for needed channel permissions, 3 for channelgroup) 1001 @type overviewType: int 1002 @param overviewID1: depending on the overviewType, set to the id of the servergroup, to the client's database id or the id of the channel 1003 @type overviewID1: int 1004 @param overviewID2: only used with overviewType=3, then set to the id of the channelgroup; otherwise set to 0 1005 @type overviewID2: int 1006 @param permissionID: the id of the permission 1007 @type permissionID: int 1008 @param permissionValue: the value of the permission 1009 @type permissionValue: int 1010 @param permissionNegated: negated flag of the permission 1011 @type permissionNegated: int 1012 @param permissionSkip: skip flag of the permission 1013 @type permissionSkip: int 1014 """
1015
1016 - def onPermissionOverviewFinishedEvent(self, serverConnectionHandlerID):
1017 """ 1018 This is called after each permission yielded by onPermissionOverviewEvent was triggered. 1019 @param serverConnectionHandlerID: the ID of the serverconnection 1020 @type serverConnectionHandlerID: int 1021 """
1022 1023
1024 - def onPlaybackShutdownCompleteEvent(self, serverConnectionHandlerID):
1025 """ 1026 This is called when a playback device can be shutdown with ts3lib.closePlaybackDevice after the process was initiated with ts3lib.initiateGracefulPlaybackShutdown. 1027 @param serverConnectionHandlerID: the ID of the serverconnection 1028 @type serverConnectionHandlerID: int 1029 """
1030
1031 - def onPluginCommandEvent(self, serverConnectionHandlerID, sender, pluginCommand):
1032 """ 1033 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. 1034 @param serverConnectionHandlerID: the ID of the serverconnection 1035 @type serverConnectionHandlerID: int 1036 @param sender: the id of the sending client 1037 @type sender: int 1038 @param pluginCommand: the command 1039 @type pluginCommand: str 1040 """
1041
1042 - def onServerConnectionInfoEvent(self, serverConnectionHandlerID):
1043 """ 1044 This is called whenever the server's connectioninfo was updated. 1045 @param serverConnectionHandlerID: the ID of the serverconnection 1046 @type serverConnectionHandlerID: int 1047 """
1048
1049 - def onServerEditedEvent(self, serverConnectionHandlerID, editerID, editerName, editerUniqueIdentifier):
1050 """ 1051 This is called whenever the server was edited by a client. 1052 @param serverConnectionHandlerID: the ID of the serverconnection 1053 @type serverConnectionHandlerID: int 1054 @param editerID: the id of the client 1055 @type editerID: int 1056 @param editerName: nick of the client 1057 @type editerName: int 1058 @param editerUniqueIdentifier: uid of the client 1059 @type editerUniqueIdentifier: str 1060 """
1061
1062 - def onServerGroupByClientIDEvent(self, serverConnectionHandlerID, name, serverGroupList, clientDatabaseID):
1063 """ 1064 This is called for each servergroup of a client requested with ts3lib.requestServerGroupsByClientID. 1065 @param serverConnectionHandlerID: the ID of the serverconnection 1066 @type serverConnectionHandlerID: int 1067 @param name: name of the servergroup 1068 @type name: str 1069 @param serverGroupList: id of the servergroup 1070 @type serverGroupList: int 1071 @param clientDatabaseID: the database id of the client 1072 @type clientDatabaseID: int 1073 """
1074
1075 - def onServerGroupClientAddedEvent(self, serverConnectionHandlerID, clientID, clientName, clientUniqueIdentity, serverGroupID, invokerClientID, invokerName, invokerUniqueIdentity):
1076 """ 1077 This is called whenever a client is added to a servergroup. 1078 @param serverConnectionHandlerID: the ID of the serverconnection 1079 @type serverConnectionHandlerID: int 1080 @param clientID: the id of the added client 1081 @type clientID: int 1082 @param clientName: nick of the added client 1083 @type clientName: str 1084 @param clientUniqueIdentity: uid of the added client 1085 @type clientUniqueIdentity: str 1086 @param serverGroupID: the id of the servergroup 1087 @type serverGroupID: int 1088 @param invokerClientID: the id of the adding client 1089 @type invokerClientID: int 1090 @param invokerName: nick of the adding client 1091 @type invokerName: str 1092 @param invokerUniqueIdentity: uid of the adding client 1093 @type invokerUniqueIdentity: str 1094 """
1095
1096 - def onServerGroupClientDeletedEvent(self, serverConnectionHandlerID, clientID, clientName, clientUniqueIdentity, serverGroupID, invokerClientID, invokerName, invokerUniqueIdentity):
1097 """ 1098 This is called whenever a client was removed from a servergroup. 1099 @param serverConnectionHandlerID: the ID of the serverconnection 1100 @type serverConnectionHandlerID: int 1101 @param clientID: the id of the removed client 1102 @type clientID: int 1103 @param clientName: nick of the removed client 1104 @type clientName: str 1105 @param clientUniqueIdentity: uid of the removed client 1106 @type clientUniqueIdentity: str 1107 @param serverGroupID: id the servergroup 1108 @type serverGroupID: int 1109 @param invokerClientID: the id of the removing client 1110 @type invokerClientID: int 1111 @param invokerName: nick of the removing client 1112 @type invokerName: str 1113 @param invokerUniqueIdentity: uid of the removing client 1114 @type invokerUniqueIdentity: str 1115 """
1116
1117 - def onServerGroupClientListEvent(self, serverConnectionHandlerID, serverGroupID, clientDatabaseID, clientNameIdentifier, clientUniqueID):
1118 """ 1119 This is called for each member of a servergroup requested with ts3lib.requestServerGroupClientList. 1120 @param serverConnectionHandlerID: the ID of the serverconnection 1121 @type serverConnectionHandlerID: int 1122 @param serverGroupID: the id of the servergroup 1123 @type serverGroupID: int 1124 @param clientDatabaseID: the database id of the member 1125 @type clientDatabaseID: int 1126 @param clientNameIdentifier: the last nick of the member or an empty string if withNames was set to False in the request 1127 @type clientNameIdentifier: str 1128 @param clientUniqueID: the uid of the member or an empty string if withNames was set to False in the request 1129 @type clientUniqueID: str 1130 """
1131
1132 - def onServerGroupListEvent(self, serverConnectionHandlerID, serverGroupID, name, atype, iconID, saveDB):
1133 """ 1134 This is called for each servergroup on the server requested with ts3lib.requestServerGroupList. 1135 @param serverConnectionHandlerID: the ID of the serverconnection 1136 @type serverConnectionHandlerID: int 1137 @param serverGroupID: the id of the servergroup 1138 @type serverGroupID: int 1139 @param name: name of the servergroup 1140 @type name: str 1141 @param atype: type of the servergroup (0=template, 1=regular, 2=serverquery) 1142 @type atype: int 1143 @param iconID: icon id of the servergroup or 0 if no icon in this group 1144 @type iconID: int 1145 @param saveDB: set to 1 if memberships are saved to the database, set to 0 otherwise 1146 @type saveDB: int 1147 """
1148
1149 - def onServerGroupListFinishedEvent(self, serverConnectionHandlerID):
1150 """ 1151 This is called after each servergroup yielded by onServerGroupListEvent was triggered. 1152 @param serverConnectionHandlerID: the ID of the serverconnection 1153 @type serverConnectionHandlerID: int 1154 """
1155
1156 - def onServerGroupPermListEvent(self, serverConnectionHandlerID, serverGroupID, permissionID, permissionValue, permissionNegated, permissionSkip):
1157 """ 1158 This is called for each granted permission of a servergroup requested with ts3lib.requestServerGroupPermList. 1159 @param serverConnectionHandlerID: the ID of the serverconnection 1160 @type serverConnectionHandlerID: int 1161 @param serverGroupID: the id of the servergroup 1162 @type serverGroupID: int 1163 @param permissionID: the id of the permission 1164 @type permissionID: int 1165 @param permissionValue: value of the permission 1166 @type permissionValue: int 1167 @param permissionNegated: negated flag 1168 @type permissionNegated: int 1169 @param permissionSkip: skip flag 1170 @type permissionSkip: int 1171 """
1172
1173 - def onServerGroupPermListFinishedEvent(self, serverConnectionHandlerID, serverGroupID):
1174 """ 1175 This is called after each permission yielded by onServerGroupPermListEvent was triggered. 1176 @param serverConnectionHandlerID: the ID of the serverconnection 1177 @type serverConnectionHandlerID: int 1178 @param serverGroupID: id of the servergroup 1179 @type serverGroupID: int 1180 """
1181
1182 - def onServerLogEvent(self, serverConnectionHandlerID, logMsg):
1183 """ 1184 This is called for each line of the serverlog requested by the TS3 Client. 1185 @param serverConnectionHandlerID: the ID of the serverconnection 1186 @type serverConnectionHandlerID: int 1187 @param logMsg: the message 1188 @type logMsg: str 1189 """
1190
1191 - def onServerLogFinishedEvent(self, serverConnectionHandlerID, lastPos, fileSize):
1192 """ 1193 This is called after the requested number of loglines were yielded by onServerLogEvent. 1194 @param serverConnectionHandlerID: the ID of the serverconnection 1195 @type serverConnectionHandlerID: int 1196 @param lastPos: 1197 @type lastPos: 1198 @param fileSize: 1199 @type fileSize: 1200 """
1201
1202 - def onServerStopEvent(self, serverConnectionHandlerID, shutdownMessage):
1203 """ 1204 This is called when the server was stopped. 1205 @param serverConnectionHandlerID: the ID of the serverconnection 1206 @type serverConnectionHandlerID: int 1207 @param shutdownMessage: if given, the shutdownmessage 1208 @type shutdownMessage: str 1209 """
1210
1211 - def onServerTemporaryPasswordListEvent(self, serverConnectionHandlerID, clientNickname, uniqueClientIdentifier, description, password, timestampStart, timestampEnd, targetChannelID, targetChannelPW):
1212 """ 1213 This is called for each temporary password on the server requested with ts3lib.requestServerTemporaryPasswordList. 1214 @param serverConnectionHandlerID: the ID of the serverconnection 1215 @type serverConnectionHandlerID: int 1216 @param clientNickname: nick of the creator 1217 @type clientNickname: str 1218 @param uniqueClientIdentifier: uid of the creator 1219 @type uniqueClientIdentifier: str 1220 @param description: description of the password 1221 @type description: str 1222 @param password: the password 1223 @type password: str 1224 @param timestampStart: time the password was created as unix timestamp 1225 @type timestampStart: int 1226 @param timestampEnd: time the password expires as unix timestamp 1227 @type timestampEnd: int 1228 @param targetChannelID: the id of the channel clients join in 1229 @type targetChannelID: int 1230 @param targetChannelPW: password to the targetChannel 1231 @type targetChannelPW: str 1232 """
1233
1234 - def onServerUpdatedEvent(self, serverConnectionHandlerID):
1235 """ 1236 This is called whenever the server variables were updated. 1237 @param serverConnectionHandlerID: the ID of the serverconnection 1238 @type serverConnectionHandlerID: int 1239 """
1240
1241 - def onSoundDeviceListChangedEvent(self, modeID, playOrCap):
1242 """ 1243 This is called when the list of sounddevices changed. 1244 @param modeID: defines the playback/capture mode 1245 @type modeID: int 1246 @param playOrCap: defines whether the playback- or capturelist changed 1247 @type playOrCap: int 1248 """
1249
1250 - def onTalkStatusChangeEvent(self, serverConnectionHandlerID, status, isReceivedWhisper, clientID):
1251 """ 1252 This is called whenever a client starts or stops talking. 1253 @param serverConnectionHandlerID: the ID of the serverconnection 1254 @type serverConnectionHandlerID: int 1255 @param status: defines whether the client starts or stops talking (see ts3defines.TalkStatus) 1256 @type status: int 1257 @param isReceivedWhisper: set to 1 if the client whispered, set to 0 otherwise 1258 @type isReceivedWhisper: int 1259 @param clientID: the id of the client 1260 @type clientID: int 1261 """
1262
1263 - def onUpdateChannelEditedEvent(self, serverConnectionHandlerID, channelID, invokerID, invokerName, invokerUniqueIdentifier):
1264 """ 1265 This is called whenever a channel was edited by a client. 1266 @param serverConnectionHandlerID: the ID of the serverconnection 1267 @type serverConnectionHandlerID: int 1268 @param channelID: the id of the channel 1269 @type channelID: int 1270 @param invokerID: the id of the client 1271 @type invokerID: int 1272 @param invokerName: nick of the client 1273 @type invokerName: str 1274 @param invokerUniqueIdentifier: uid of the client 1275 @type invokerUniqueIdentifier: str 1276 """
1277
1278 - def onUpdateChannelEvent(self, serverConnectionHandlerID, channelID):
1279 """ 1280 This is called whenever the channel variables of a specific channel are updated. 1281 @param serverConnectionHandlerID: the ID of the serverconnection 1282 @type serverConnectionHandlerID: int 1283 @param channelID: the id of the channel 1284 @type channelID: int 1285 """
1286
1287 - def onUpdateClientEvent(self, serverConnectionHandlerID, clientID, invokerID, invokerName, invokerUniqueIdentifier):
1288 """ 1289 This is called whenever the client variables of a specific client are updated. 1290 @param serverConnectionHandlerID: the ID of the serverconnection 1291 @type serverConnectionHandlerID: int 1292 @param clientID: the id of the client 1293 @type clientID: int 1294 @param invokerID: id of the client invoking the change or 0 if it was a selfupdate 1295 @type invokerID: int 1296 @param invokerName: nick of the invoking client 1297 @type invokerName: str 1298 @param invokerUniqueIdentifier: uid of the invoking client 1299 @type invokerUniqueIdentifier: str 1300 """
1301