diff --git a/examples/automover.py b/examples/automover.py index c9fb9d7..c701434 100644 --- a/examples/automover.py +++ b/examples/automover.py @@ -21,7 +21,7 @@ moveids = { server = TS3Server('127.0.0.1', 10011, 1) server.login('serveradmin', 'supersecretpassword') -print "Logged In" +print("Logged In") poke = [] @@ -32,19 +32,19 @@ while True: # Check if the client is in the Move IDs if int(client['client_database_id']) in moveids: clinfo = moveids[int(client['client_database_id'])] - print "Found ID %s: %s" % (client['client_database_id'], client['client_nickname']) + print("Found ID %s: %s" % (client['client_database_id'], client['client_nickname'])) # If we have a channel defined and they're not in it, move them if 'destination' in clinfo and not int(client['cid']) == clinfo['destination']: if server.send_command('clientmove', keys={'clid': client['clid'], 'cid': clinfo['destination']}).is_successful: - print "Moved %s to Channel %s" % (client['client_nickname'], clinfo['destination']) + print("Moved %s to Channel %s" % (client['client_nickname'], clinfo['destination'])) # If we have a fixed name defined, tell them to change it or kick them if 'name' in clinfo and not client['client_nickname'] == clinfo['name']: if not client['clid'] in poke: poke[client['clid']] = 0 poke[client['clid']] += 1 - print "Warning %s out of 3" % poke[client['clid']] + print("Warning %s out of 3" % poke[client['clid']]) server.send_command('clientpoke', keys={'clid': client['clid'], 'msg': 'Change your name to "%s"! Warning %s of 3' % (clinfo['name'], poke[client['clid']])}) if poke > 3: server.send_command('clientkick', keys={'clid': client['clid'], 'reasonid': 5}) diff --git a/examples/gents3privkey.py b/examples/gents3privkey.py index 44a0c3a..5f1abae 100755 --- a/examples/gents3privkey.py +++ b/examples/gents3privkey.py @@ -72,7 +72,7 @@ def main(): else: response = ts3.send_command('privilegekeyadd', keys={'tokentype': TOKEN_CHANNEL_GROUP, 'tokenid1': args['channelgroup'], 'tokenid2': args['channel']}) if response.is_successful: - print response.data[0]['token'] + print(response.data[0]['token']) sys.exit(0) else: sys.exit("Error creating key: %s" % response.response['msg'])