From 90e0d94f57a6ed916d81e590d9a2d63a6ed69e7d Mon Sep 17 00:00:00 2001 From: Karl-Martin Minkner Date: Mon, 25 May 2015 09:47:50 +0200 Subject: [PATCH] Added functions to add or remove servergroups --- plugins/core_TS3clients.py | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) diff --git a/plugins/core_TS3clients.py b/plugins/core_TS3clients.py index 16e16ca..3554c11 100644 --- a/plugins/core_TS3clients.py +++ b/plugins/core_TS3clients.py @@ -36,7 +36,6 @@ def grouplist(self): if nextGrouplist <= time.time(): grouplist = ts3tools.parse_raw_data(base.send_receive('servergrouplist'), 'sgid') nextGrouplist = time.time() + nextGrouplistInterval - print(grouplist) return grouplist def clientmove(self, clid, cid): @@ -57,3 +56,13 @@ def clientinfo(self, clid): query = base.send_receive('clientinfo clid=' + clid) parsed = ts3tools.parse_raw_answer(query) return parsed + + def client_add_servergroup(self, sgid, cldbid): + query = base.send_receive('servergroupaddclient sgid=' + sgid + ' cldbid=' + cldbid) + parsed = ts3tools.parse_raw_answer(query) + return parsed + + def client_del_servergroup(self, sgid, cldbid): + query = base.send_receive('servergroupdelclient sgid=' + sgid + ' cldbid=' + cldbid) + parsed = ts3tools.parse_raw_answer(query) + return parsed