예제 #1
0
 def onMenuItemEvent(self, schid, atype, menuItemID, channel):
     if atype != ts3defines.PluginMenuType.PLUGIN_MENU_TYPE_CHANNEL: return
     try:
         (error, ownID) = ts3lib.getClientID(schid)
         (error, maxclients) = ts3lib.getChannelVariable(
             schid, channel,
             ts3defines.ChannelProperties.CHANNEL_MAXCLIENTS)
         if self.debug:
             ts3lib.printMessageToCurrentTab(
                 "error: {0} | maxclients: {1}".format(error, maxclients))
         if menuItemID == 0:
             pw = inputBox("Enter Channel Password", "Password:"******"clients: {0}".format(clients))
             (error, maxfamilyclients) = ts3lib.getChannelVariable(
                 schid, channel,
                 ts3defines.ChannelProperties.CHANNEL_MAXFAMILYCLIENTS)
             if self.debug:
                 ts3lib.printMessageToCurrentTab(
                     "error: {0} | maxfamilyclients: {1}".format(
                         error, maxfamilyclients))
             if clients < maxclients and clients < maxfamilyclients:
                 ts3lib.requestClientMove(schid, ownID, channel, pw)
                 return True
             (error, name) = ts3lib.getChannelVariableAsString(
                 schid, channel, ts3defines.ChannelProperties.CHANNEL_NAME)
             self.schid = schid
             self.channel = channel
             self.password = pw
             self.cname = name
             if not pw:
                 ts3lib.printMessageToCurrentTab(
                     "Queued for channel [url=channelid://{0}]{1}[/url]. [color=red]{2}[/color] client(s) remaining."
                     .format(channel, name, maxclients - clients + 1))
             else:
                 ts3lib.printMessageToCurrentTab(
                     "Queued for channel [url=channelid://{0}]{1}[/url] with password \"{2}\". [color=red]{3}[/color] client(s) remaining."
                     .format(channel, name, pw, maxclients - clients + 1))
         elif menuItemID == 1:
             pw = inputBox("Enter Channel Password", "Password:"******"pyTSon", 0)
예제 #2
0
 def onClientSelfVariableUpdateEvent(self, schid, flag, oldValue, newValue) :
     if not self.schids or len(self.schids) < 1 or schid != self.schids[0]: return
     if flag != ts3defines.ClientPropertiesRare.CLIENT_AWAY: return
     newValue = int(newValue)
     if newValue == ts3defines.AwayStatus.AWAY_ZZZ:
         ts3lib.setChannelVariableAsInt(schid, self.supchan, ts3defines.ChannelProperties.CHANNEL_MAXCLIENTS, 0)
         ts3lib.setChannelVariableAsString(schid, self.supchan, ts3defines.ChannelProperties.CHANNEL_NAME, self.chan.get("props", "name closed"))
         ts3lib.flushChannelUpdates(schid, self.supchan)
     elif newValue == ts3defines.AwayStatus.AWAY_NONE:
         ts3lib.setChannelVariableAsInt(schid, self.supchan, ts3defines.ChannelProperties.CHANNEL_MAXCLIENTS, self.chan.getint("props", "maxclients"))
         ts3lib.setChannelVariableAsString(schid, self.supchan, ts3defines.ChannelProperties.CHANNEL_NAME, self.chan.get("props", "name open"))
         ts3lib.flushChannelUpdates(schid, self.supchan)
예제 #3
0
 def onNewChannelCreatedEvent(self, schid, cid, channelParentID, clid,
                              invokerName, invokerUniqueIdentifier):
     (err, suid) = ts3lib.getServerVariable(
         schid,
         ts3defines.VirtualServerProperties.VIRTUALSERVER_UNIQUE_IDENTIFIER)
     if not suid in self.servers: return
     (err, sgids) = ts3lib.getClientVariable(
         schid, clid, ts3defines.ClientPropertiesRare.CLIENT_SERVERGROUPS)
     if not set(sgids).isdisjoint(self.servers[suid]): return
     (err, perm) = ts3lib.getChannelVariable(
         schid, cid, ts3defines.ChannelProperties.CHANNEL_FLAG_PERMANENT)
     # (err, semi) = ts3lib.getChannelVariable(schid, cid, ts3defines.ChannelProperties.CHANNEL_FLAG_SEMI_PERMANENT)
     if not perm: return
     ts3lib.setChannelVariableAsInt(
         schid, cid, ts3defines.ChannelProperties.CHANNEL_FLAG_PERMANENT, 0)
     ts3lib.flushChannelUpdates(schid, cid)
예제 #4
0
 def onClientMoveEvent(self, schid, clientID, oldChannelID, newChannelID,
                       visibility, moveMessage):
     if self.schid != schid: return
     if self.channel == oldChannelID:
         clients = self.channelClientCount(schid, oldChannelID)
         if self.debug:
             ts3lib.printMessageToCurrentTab("clients: {0}".format(clients))
         (error, maxclients) = ts3lib.getChannelVariable(
             schid, oldChannelID,
             ts3defines.ChannelProperties.CHANNEL_MAXCLIENTS)
         if self.debug:
             ts3lib.printMessageToCurrentTab(
                 "error: {0} | maxclients: {1}".format(error, maxclients))
         (error, maxfamilyclients) = ts3lib.getChannelVariable(
             schid, oldChannelID,
             ts3defines.ChannelProperties.CHANNEL_MAXFAMILYCLIENTS)
         if self.debug:
             ts3lib.printMessageToCurrentTab(
                 "error: {0} | maxfamilyclients: {1}".format(
                     error, maxfamilyclients))
         if clients < maxclients and clients < maxfamilyclients:
             (error, ownID) = ts3lib.getClientID(schid)
             ts3lib.requestClientMove(schid, ownID, oldChannelID,
                                      self.password)
             self.schid = 0
             self.channel = 0
             self.password = ""
             self.name = ""
         else:
             ts3lib.printMessageToCurrentTab(
                 "{0} left channel {1}. [color=red]{2}[/color] client(s) remaining."
                 .format(clientURL(schid, clientID),
                         channelURL(schid, oldChannelID),
                         maxclients - clients + 1))
     print("fullchannel:", self.fullchannel, "newChannelID:", newChannelID)
     if self.fullchannel == newChannelID:
         self.fullchannel = 0
         (error, maxclients) = ts3lib.getChannelVariable(
             schid, newChannelID,
             ts3defines.ChannelProperties.CHANNEL_MAXCLIENTS)
         ts3lib.setChannelVariableAsInt(
             schid, newChannelID,
             ts3defines.ChannelProperties.CHANNEL_MAXCLIENTS,
             maxclients - 1)
         ts3lib.flushChannelUpdates(schid, newChannelID)
         self.schid = 0
예제 #5
0
 def onUpdateChannelEditedEvent(self, schid, channelID, invokerID, invokerName, invokerUniqueIdentifier):
     (err, suid) = ts3lib.getServerVariable(schid, ts3defines.VirtualServerProperties.VIRTUALSERVER_UNIQUE_IDENTIFIER)
     if suid != self.suid: return
     (err, ownID) = ts3lib.getClientID(schid)
     if invokerID == ownID:
         (err, self.settings["maxclients"]) = ts3lib.getChannelVariable(schid, channelID, ts3defines.ChannelProperties.CHANNEL_MAXCLIENTS)
         (err, self.settings["tp"]) = ts3lib.getChannelVariable(schid, channelID, ts3defines.ChannelPropertiesRare.CHANNEL_NEEDED_TALK_POWER)
     (err, ownChannel) = ts3lib.getChannelOfClient(schid, ownID)
     if channelID != ownChannel: return
     (err, invokerChannel) = ts3lib.getChannelOfClient(schid, invokerID)
     if invokerChannel == channelID: return
     _needed = False
     (err, ntp) = ts3lib.getChannelVariable(schid, channelID, ts3defines.ChannelPropertiesRare.CHANNEL_NEEDED_TALK_POWER)
     if ntp != self.settings["tp"]:
         _needed = True
         ts3lib.setChannelVariableAsInt(schid, channelID, ts3defines.ChannelPropertiesRare.CHANNEL_NEEDED_TALK_POWER, self.settings["tp"])
     (err, cmc) = ts3lib.getChannelVariable(schid, channelID, ts3defines.ChannelProperties.CHANNEL_MAXCLIENTS)
     ts3lib.setChannelVariableAsInt(schid, channelID, ts3defines.ChannelPropertiesRare.CHANNEL_FLAG_MAXCLIENTS_UNLIMITED, 0)
     if cmc != self.settings["maxclients"]:
         _needed = True
         ts3lib.setChannelVariableAsInt(schid, channelID, ts3defines.ChannelProperties.CHANNEL_MAXCLIENTS, self.settings["maxclients"])
     if _needed:
         ts3lib.flushChannelUpdates(schid, channelID)
         self.violations[invokerUniqueIdentifier] += 1
         if self.violations[invokerUniqueIdentifier] > 2:
             (err, dbid) = ts3lib.getClientVariable(schid, ts3defines.ClientPropertiesRare.CLIENT_DATABASE_ID)
             ts3lib.requestSetClientChannelGroup(schid, [9], [channelID], [dbid])
             del self.violations[invokerUniqueIdentifier]
예제 #6
0
    def onMenuItemEvent(self, schid, atype, menuItemID, selectedItemID):
        if atype != ts3defines.PluginMenuType.PLUGIN_MENU_TYPE_GLOBAL or menuItemID != 0:
            return
        err, clientID = ts3lib.getClientID(schid)
        err, channelID = ts3lib.getChannelOfClient(schid, clientID)
        # CHANNEL_NAME
        err, self.CHANNEL_NAME = ts3lib.getChannelVariableAsString(
            schid, channelID, ts3defines.ChannelProperties.CHANNEL_NAME)
        ts3lib.setChannelVariableAsString(
            schid, 0, ts3defines.ChannelProperties.CHANNEL_NAME,
            self.CHANNEL_NAME + "_")
        # CHANNEL_NAME_PHONETIC
        # err, CHANNEL_NAME_PHONETIC = ts3lib.getChannelVariableAsString(schid, channelID, ts3defines.ChannelPropertiesRare.CHANNEL_NAME_PHONETIC)

        # CHANNEL_TOPIC
        # err, CHANNEL_TOPIC = ts3lib.getChannelVariableAsString(schid, channelID, ts3defines.ChannelProperties.CHANNEL_TOPIC)
        # ts3lib.setChannelVariableAsString(schid,0,ts3defines.ChannelProperties.CHANNEL_TOPIC,CHANNEL_TOPIC)
        # CHANNEL_DESCRIPTION
        # err, CHANNEL_DESCRIPTION = ts3lib.getChannelVariableAsString(schid, channelID, ts3defines.ChannelProperties.CHANNEL_DESCRIPTION)
        # ts3lib.setChannelVariableAsString(schid,0,ts3defines.ChannelProperties.CHANNEL_DESCRIPTION,CHANNEL_DESCRIPTION)
        # CHANNEL_CODEC
        err, CHANNEL_CODEC = ts3lib.getChannelVariableAsInt(
            schid, channelID, ts3defines.ChannelProperties.CHANNEL_CODEC)
        ts3lib.setChannelVariableAsInt(
            schid, 0, ts3defines.ChannelProperties.CHANNEL_CODEC,
            CHANNEL_CODEC)
        # CHANNEL_CODEC_QUALITY
        err, CHANNEL_CODEC_QUALITY = ts3lib.getChannelVariableAsInt(
            schid, channelID,
            ts3defines.ChannelProperties.CHANNEL_CODEC_QUALITY)
        ts3lib.setChannelVariableAsInt(
            schid, 0, ts3defines.ChannelProperties.CHANNEL_CODEC_QUALITY,
            CHANNEL_CODEC_QUALITY)
        # CHANNEL_MAXCLIENTS
        err, CHANNEL_MAXCLIENTS = ts3lib.getChannelVariableAsUInt64(
            schid, channelID, ts3defines.ChannelProperties.CHANNEL_MAXCLIENTS)
        ts3lib.setChannelVariableAsUInt64(
            schid, 0, ts3defines.ChannelProperties.CHANNEL_MAXCLIENTS,
            CHANNEL_MAXCLIENTS)
        # CHANNEL_MAXFAMILYCLIENTS
        err, CHANNEL_MAXFAMILYCLIENTS = ts3lib.getChannelVariableAsUInt64(
            schid, channelID,
            ts3defines.ChannelProperties.CHANNEL_MAXFAMILYCLIENTS)
        ts3lib.setChannelVariableAsUInt64(
            schid, 0, ts3defines.ChannelProperties.CHANNEL_MAXFAMILYCLIENTS,
            CHANNEL_MAXFAMILYCLIENTS)
        # CHANNEL_NEEDED_TALK_POWER
        err, CHANNEL_NEEDED_TALK_POWER = ts3lib.getChannelVariableAsInt(
            schid, channelID,
            ts3defines.ChannelPropertiesRare.CHANNEL_NEEDED_TALK_POWER)
        ts3lib.setChannelVariableAsInt(
            schid, 0,
            ts3defines.ChannelPropertiesRare.CHANNEL_NEEDED_TALK_POWER,
            CHANNEL_NEEDED_TALK_POWER)
        # self.returncode = ts3lib.createReturnCode()
        ts3lib.flushChannelCreation(schid, 0)  #, self.returncode)
예제 #7
0
 def onClientChannelGroupChangedEvent(self, schid, channelGroupID,
                                      channelID, clientID, invokerClientID,
                                      invokerName, invokerUniqueIdentity):
     (err, suid) = ts3lib.getServerVariable(
         schid,
         ts3defines.VirtualServerProperties.VIRTUALSERVER_UNIQUE_IDENTIFIER)
     # if self.debug: ts3lib.printMessageToCurrentTab('suid != self.suid: {}'.format(suid != self.suid))
     if suid != self.suid: return
     (err, ownID) = ts3lib.getClientID(schid)
     # if self.debug: ts3lib.printMessageToCurrentTab('clientID != ownID: {}'.format(clientID != ownID))
     if clientID != ownID: return
     # if self.debug: ts3lib.printMessageToCurrentTab('channelGroupID != self.channelAdminGroupID: {}'.format(channelGroupID != self.channelAdminGroupID))
     if channelGroupID != self.channelAdminGroupID: return
     # if self.debug: ts3lib.printMessageToCurrentTab('invokerClientID != 0: {}'.format(invokerClientID != 0))
     if invokerClientID == 0:
         (err, ntp) = ts3lib.getChannelVariable(
             schid, channelID,
             ts3defines.ChannelPropertiesRare.CHANNEL_NEEDED_TALK_POWER)
         if not ntp or ntp == 0:
             ts3lib.setChannelVariableAsInt(
                 schid, channelID,
                 ts3defines.ChannelPropertiesRare.CHANNEL_NEEDED_TALK_POWER,
                 self.settings["tp"])
         # (err, cmc) = ts3lib.getChannelVariable(schid, channelID, ts3defines.ChannelProperties.CHANNEL_MAXCLIENTS)
         ts3lib.setChannelVariableAsInt(
             schid, channelID, ts3defines.ChannelPropertiesRare.
             CHANNEL_FLAG_MAXCLIENTS_UNLIMITED, 0)
         ts3lib.setChannelVariableAsInt(
             schid, channelID,
             ts3defines.ChannelProperties.CHANNEL_MAXCLIENTS,
             self.settings["maxclients"])
         (err, cnp) = ts3lib.getChannelVariable(
             schid, channelID,
             ts3defines.ChannelPropertiesRare.CHANNEL_NAME_PHONETIC)
         if not cnp or cnp == "":
             ts3lib.setChannelVariableAsString(
                 schid, channelID,
                 ts3defines.ChannelPropertiesRare.CHANNEL_NAME_PHONETIC,
                 "Team | Lounge 1")
         ts3lib.flushChannelUpdates(schid, channelID)
     return
     # clid = ts3lib.getClientIDbyNickname(schid, self.gommeBotNick)
     # if not clid: ts3lib.printMessage(schid, 'Gomme-Bot not found.', ts3defines.PluginMessageTarget.PLUGIN_MESSAGE_TARGET_SERVER)
     # (err, uid) = ts3lib.getClientVariable(schid, self.gommeBotID, ts3defines.ClientProperties.CLIENT_UNIQUE_IDENTIFIER)
     # if uid != "serveradmin": return
     # if self.debug: ts3lib.printMessageToCurrentTab('self.gommeBotID == 0: {}'.format(self.gommeBotID == 0))
     if self.gommeBotID == 0: return
     ts3lib.requestSendPrivateTextMsg(schid, "registriert", self.gommeBotID)
예제 #8
0
 def onClientChannelGroupChangedEvent(self, schid, channelGroupID, channelID, clientID, invokerClientID, invokerName, invokerUniqueIdentity):
     (err, suid) = ts3lib.getServerVariable(schid, ts3defines.VirtualServerProperties.VIRTUALSERVER_UNIQUE_IDENTIFIER)
     if suid != self.suid: return
     (err, ownID) = ts3lib.getClientID(schid)
     if clientID != ownID: return
     if channelGroupID != self.channelAdminGroupID: return
     if invokerClientID == 0:
         (err, ntp) = ts3lib.getChannelVariable(schid, channelID, ts3defines.ChannelPropertiesRare.CHANNEL_NEEDED_TALK_POWER)
         if not ntp or ntp == 0: ts3lib.setChannelVariableAsInt(schid, channelID, ts3defines.ChannelPropertiesRare.CHANNEL_NEEDED_TALK_POWER, self.settings["tp"])
         ts3lib.setChannelVariableAsInt(schid, channelID, ts3defines.ChannelPropertiesRare.CHANNEL_FLAG_MAXCLIENTS_UNLIMITED, 0)
         ts3lib.setChannelVariableAsInt(schid, channelID, ts3defines.ChannelProperties.CHANNEL_MAXCLIENTS, self.settings["maxclients"])
         (err, cnp) = ts3lib.getChannelVariable(schid, channelID, ts3defines.ChannelPropertiesRare.CHANNEL_NAME_PHONETIC)
         if not cnp or cnp == "": ts3lib.setChannelVariableAsString(schid, channelID, ts3defines.ChannelPropertiesRare.CHANNEL_NAME_PHONETIC, "Team | Lounge 1")
         ts3lib.flushChannelUpdates(schid, channelID)
     if self.gommeBotID < 1: return
     ts3lib.requestSendPrivateTextMsg(schid, "registriert", self.gommeBotID)
예제 #9
0
 def createChannel(self, schid):
     ts3lib.setChannelVariableAsString(schid, 0, ts3defines.ChannelProperties.CHANNEL_NAME, self.chan.get("props", "name open"))
     ts3lib.setChannelVariableAsInt(schid, 0, ts3defines.ChannelProperties.CHANNEL_MAXCLIENTS, self.chan.getint("props", "maxclients"))
     ts3lib.setChannelVariableAsInt(schid, 0, ts3defines.ChannelProperties.CHANNEL_CODEC, self.chan.getint("props", "codec"))
     ts3lib.setChannelVariableAsInt(schid, 0, ts3defines.ChannelProperties.CHANNEL_CODEC_QUALITY, self.chan.getint("props", "codec_quality"))
     ts3lib.setChannelVariableAsString(schid, 0, ts3defines.ChannelProperties.CHANNEL_DESCRIPTION, self.description)
     ts3lib.setChannelVariableAsInt(schid, 0, ts3defines.ChannelProperties.CHANNEL_FLAG_SEMI_PERMANENT, 1)
     ts3lib.setChannelVariableAsInt(schid, 0, ts3defines.ChannelPropertiesRare.CHANNEL_FLAG_MAXCLIENTS_UNLIMITED, 0)
     ts3lib.setChannelVariableAsInt(schid, 0, ts3defines.ChannelPropertiesRare.CHANNEL_NEEDED_TALK_POWER, 1337)
     print(self.schids)
     print(self.schids[schid])
     return
     ts3lib.flushChannelCreation(schid, self.schids[schid])
     self.waitforchannel = True
예제 #10
0
 def onMenuItemEvent(self, schid, atype, menuItemID, channel):
     if atype != ts3defines.PluginMenuType.PLUGIN_MENU_TYPE_CHANNEL: return
     try:
         (error, ownID) = ts3lib.getClientID(schid)
         (error, maxclients) = ts3lib.getChannelVariable(
             schid, channel,
             ts3defines.ChannelProperties.CHANNEL_MAXCLIENTS)
         if self.debug:
             ts3lib.printMessageToCurrentTab(
                 "error: {0} | maxclients: {1}".format(error, maxclients))
         if menuItemID == 0:
             x = QWidget()
             x.setAttribute(Qt.WA_DeleteOnClose)
             password = QInputDialog.getText(x, "Enter Channel Password",
                                             "Password:"******"clients: {0}".format(clients))
             (error, maxfamilyclients) = ts3lib.getChannelVariable(
                 schid, channel,
                 ts3defines.ChannelProperties.CHANNEL_MAXFAMILYCLIENTS)
             if self.debug:
                 ts3lib.printMessageToCurrentTab(
                     "error: {0} | maxfamilyclients: {1}".format(
                         error, maxfamilyclients))
             if clients < maxclients and clients < maxfamilyclients:
                 ts3lib.requestClientMove(schid, ownID, channel, password)
                 return True
             (error, name) = ts3lib.getChannelVariableAsString(
                 schid, channel, ts3defines.ChannelProperties.CHANNEL_NAME)
             self.schid = schid
             self.channel = channel
             self.password = password
             self.cname = name
             if password == "":
                 ts3lib.printMessageToCurrentTab(
                     "Queued for channel [url=channelid://{0}]{1}[/url]. [color=red]{2}[/color] client(s) remaining."
                     .format(channel, name, maxclients - clients + 1))
             else:
                 ts3lib.printMessageToCurrentTab(
                     "Queued for channel [url=channelid://{0}]{1}[/url] with password \"{2}\". [color=red]{3}[/color] client(s) remaining."
                     .format(channel, name, password,
                             maxclients - clients + 1))
         elif menuItemID == 1:
             ts3lib.setChannelVariableAsInt(
                 schid, channel,
                 ts3defines.ChannelProperties.CHANNEL_MAXCLIENTS,
                 maxclients + 1)
             err = ts3lib.flushChannelUpdates(schid, channel)
             print("#1 error:", err, "msg:", ts3lib.getErrorMessage(err))
             (error, ownID) = ts3lib.getClientID(schid)
             ts3lib.requestClientMove(schid, ownID, channel, "123")
             ts3lib.setChannelVariableAsInt(
                 schid, channel,
                 ts3defines.ChannelProperties.CHANNEL_MAXCLIENTS,
                 maxclients)
             err = ts3lib.flushChannelUpdates(schid, channel)
             print("#2 error:", err, "msg:", ts3lib.getErrorMessage(err))
     except:
         from traceback import format_exc
         ts3lib.logMessage(format_exc(), ts3defines.LogLevel.LogLevel_ERROR,
                           "pyTSon", 0)
예제 #11
0
    def fakeChannel(self, schid, channelID):
        channel = self.ts3host.getChannel(schid, channelID)
        debug = PluginHost.cfg.getboolean("general", "verbose")
        (error, name) = ts3lib.getChannelVariable(
            schid, channelID, ts3defines.ChannelProperties.CHANNEL_NAME)
        name = name.encode("utf-8").decode(sys.stdout.encoding)
        # TODO MODIFY NAME
        if debug: print("err:", error, "CHANNEL_NAME", name)
        if not error and name:
            ts3lib.setChannelVariableAsString(
                schid, 0, ts3defines.ChannelProperties.CHANNEL_NAME, name)

        (error, phonetic) = ts3lib.getChannelVariable(
            schid, channelID,
            ts3defines.ChannelPropertiesRare.CHANNEL_NAME_PHONETIC)
        if debug: print("err:", error, "CHANNEL_NAME_PHONETIC", phonetic)
        if not error and phonetic:
            ts3lib.setChannelVariableAsString(
                schid, 0,
                ts3defines.ChannelPropertiesRare.CHANNEL_NAME_PHONETIC,
                phonetic)

        (error, pw) = ts3lib.getChannelVariable(
            schid, channelID,
            ts3defines.ChannelProperties.CHANNEL_FLAG_PASSWORD)
        if debug: print("err:", error, "CHANNEL_FLAG_PASSWORD", pw)
        if pw:
            (err, path, _pw) = ts3lib.getChannelConnectInfo(schid, channelID)
            if debug: print("err:", error, "_pw", _pw)
            ts3lib.setChannelVariableAsString(
                schid, 0, ts3defines.ChannelProperties.CHANNEL_PASSWORD,
                _pw if _pw else ".")
        """
        (error, topic) = ts3lib.getChannelVariable(schid, channelID, ts3defines.ChannelProperties.CHANNEL_TOPIC)
        if debug: print("err:", error, "CHANNEL_TOPIC", topic)
        if not error and topic: ts3lib.setChannelVariableAsString(schid, 0,ts3defines.ChannelProperties.CHANNEL_TOPIC,topic)

        ts3lib.requestChannelDescription(schid, channelID)
        (error, description) = ts3lib.getChannelVariable(schid, channelID, ts3defines.ChannelProperties.CHANNEL_DESCRIPTION)
        if debug: print("err:", error, "CHANNEL_DESCRIPTION", description)
        if not error and description: ts3lib.setChannelVariableAsString(schid, 0,ts3defines.ChannelProperties.CHANNEL_DESCRIPTION,description.decode('utf-8'))
        """
        (error, neededtp) = ts3lib.getChannelVariable(
            schid, channelID,
            ts3defines.ChannelPropertiesRare.CHANNEL_NEEDED_TALK_POWER)
        if debug: print("err:", error, "CHANNEL_NEEDED_TALK_POWER", neededtp)
        if not error and neededtp:
            ts3lib.setChannelVariableAsInt(
                schid, 0,
                ts3defines.ChannelPropertiesRare.CHANNEL_NEEDED_TALK_POWER,
                neededtp)

        (error, codec) = ts3lib.getChannelVariable(
            schid, channelID, ts3defines.ChannelProperties.CHANNEL_CODEC)
        if debug: print("err:", error, "CHANNEL_CODEC", codec)
        if not error and codec:
            ts3lib.setChannelVariableAsInt(
                schid, 0, ts3defines.ChannelProperties.CHANNEL_CODEC, codec)

        (error, quality) = ts3lib.getChannelVariable(
            schid, channelID,
            ts3defines.ChannelProperties.CHANNEL_CODEC_QUALITY)
        if debug: print("err:", error, "CHANNEL_CODEC_QUALITY", quality)
        if not error and quality:
            ts3lib.setChannelVariableAsInt(
                schid, 0, ts3defines.ChannelProperties.CHANNEL_CODEC_QUALITY,
                quality)

        (error, latency) = ts3lib.getChannelVariable(
            schid, channelID,
            ts3defines.ChannelProperties.CHANNEL_CODEC_LATENCY_FACTOR)
        if debug: print("err:", error, "CHANNEL_CODEC_LATENCY_FACTOR", latency)
        if not error and latency:
            ts3lib.setChannelVariableAsInt(
                schid, 0,
                ts3defines.ChannelProperties.CHANNEL_CODEC_LATENCY_FACTOR,
                latency)

        (error, unencrypted) = ts3lib.getChannelVariable(
            schid, channelID,
            ts3defines.ChannelProperties.CHANNEL_CODEC_IS_UNENCRYPTED)
        if debug:
            print("err:", error, "CHANNEL_CODEC_IS_UNENCRYPTED", unencrypted)
        if not error and unencrypted:
            ts3lib.setChannelVariableAsInt(
                schid, 0,
                ts3defines.ChannelProperties.CHANNEL_CODEC_IS_UNENCRYPTED,
                unencrypted)

        (error, maxclients) = ts3lib.getChannelVariable(
            schid, channelID, ts3defines.ChannelProperties.CHANNEL_MAXCLIENTS)
        if debug: print("err:", error, "CHANNEL_MAXCLIENTS", maxclients)
        if not error and maxclients:
            ts3lib.setChannelVariableAsInt(
                schid, 0, ts3defines.ChannelProperties.CHANNEL_MAXCLIENTS,
                maxclients)

        (error, maxfamilyclients) = ts3lib.getChannelVariable(
            schid, channelID,
            ts3defines.ChannelProperties.CHANNEL_MAXFAMILYCLIENTS)
        if debug:
            print("err:", error, "CHANNEL_MAXFAMILYCLIENTS", maxfamilyclients)
        if not error and maxfamilyclients:
            ts3lib.setChannelVariableAsInt(
                schid, 0,
                ts3defines.ChannelProperties.CHANNEL_MAXFAMILYCLIENTS,
                maxfamilyclients)

        (error, iconid) = ts3lib.getChannelVariable(
            schid, channelID, ts3defines.ChannelPropertiesRare.CHANNEL_ICON_ID)
        if debug: print("err:", error, "CHANNEL_ICON_ID", iconid)
        if not error and iconid:
            ts3lib.setChannelVariableAsInt(
                schid, 0, ts3defines.ChannelPropertiesRare.CHANNEL_ICON_ID,
                iconid)

        ts3lib.flushChannelCreation(schid, 0)