예제 #1
0
 def grouplist(self):
     global grouplist, nextGrouplist
     if nextGrouplist <= time.time():
         grouplist = ts3tools.parse_raw_data(
             base.send_receive('servergrouplist'), 'sgid')
         nextGrouplist = time.time() + nextGrouplistInterval
     return grouplist
예제 #2
0
 def channellist(self, flags='-topic -flags -voice -limits -icon'):
     global channellist, nextChannellist
     if nextChannellist <= time.time():
         channellist = ts3tools.parse_raw_data(
             base.send_receive('channellist ' + flags), 'cid')
         nextChannellist = time.time() + nextChannellistInterval
     return channellist
예제 #3
0
 def clientlist(
         self,
         flags='-uid -away -voice -times -groups -info -icon -country'):
     global clientlist, nextClientlist
     if nextClientlist <= time.time():
         clientlist = ts3tools.parse_raw_data(
             base.send_receive('clientlist ' + flags), 'clid')
         nextClientlist = time.time() + nextClientlistInterval
     return clientlist
예제 #4
0
 def channeledit(self, cid, propertiesdict=[]):
     # parse all properties
     properties = ''
     for item in propertiesdict:
         properties = properties + ' ' + item + '=' + ts3tools.escape_text(
             str(propertiesdict[item]))
     return ts3tools.parse_raw_data(
         base.send_receive('channeledit cid=' + str(cid) + ' ' +
                           properties))
예제 #5
0
 def channelcreate(self, name, propertiesdict=[]):
     # parse all properties
     properties = ''
     for item in propertiesdict:
         properties = properties + ' ' + item + '=' + ts3tools.escape_text(
             str(propertiesdict[item]))
     return ts3tools.parse_raw_data(
         base.send_receive('channelcreate channel_name=' +
                           ts3tools.escape_text(name) + properties))
예제 #6
0
 def clientmove(self, clid, cid):
     clidstring = ''
     if isinstance(clid, list):
         i = False
         for one in clid:
             if i is False:
                 clidstring += one
                 i = True
             else:
                 clidstring += '|' + one
     else:
         clidstring = clid
     return ts3tools.parse_raw_data(
         base.send_receive('clientmove clid=' + clidstring + ' cid=' + cid))