pathmann / pyTSon

pyTSon is a plugin for the TeamSpeak 3 client, it offers a python interface for the plugin sdk
https://pytson.4qt.de
GNU General Public License v3.0
79 stars 12 forks source link

ts3.requestClientKickFromChannel returns 0 even if it should #118

Closed DasMonschta closed 5 years ago

DasMonschta commented 5 years ago

error = ts3lib.requestClientKickFromChannel(...)

error is always 0 even if the client has no rights to perform the kick action.

same with requestSetClientChannelGroup()

Bluscream commented 5 years ago

You need to use ts3lib.createReturnCode() and onServerErrorEvent() / onServerPermissionErrorEvent

DasMonschta commented 5 years ago

so. i create a global var and with onServerPermissionErrorEvent i check for the returncode and set my global var?

i will try it

Bluscream commented 5 years ago

yes, best to create a list in case something doesn't arrive before the next

DasMonschta commented 5 years ago

cant follow you with the list ^^

Bluscream commented 5 years ago

returncodes = [] def whereineedthem(): ret = ts3lib.createReturnCode() returncodes.add(ret) Bla(id, ret)

def onerror(ret): if not ret in returncodes: return returncodes.remove(ret)

DasMonschta commented 5 years ago

sneaky