mirror of
https://github.com/nikdoof/python-ts3.git
synced 2025-12-17 11:59:27 +00:00
Fix some connection and escaping issues
This commit is contained in:
5
ts3.py
5
ts3.py
@@ -1,3 +1,4 @@
|
|||||||
|
import time
|
||||||
import socket
|
import socket
|
||||||
import logging
|
import logging
|
||||||
|
|
||||||
@@ -46,6 +47,7 @@ class TS3Proto():
|
|||||||
|
|
||||||
data = self._sockfile.readline()
|
data = self._sockfile.readline()
|
||||||
if data.strip() == "TS3":
|
if data.strip() == "TS3":
|
||||||
|
self._sockfile.readline()
|
||||||
self._connected = True
|
self._connected = True
|
||||||
return True
|
return True
|
||||||
|
|
||||||
@@ -136,6 +138,9 @@ class TS3Proto():
|
|||||||
v = key.strip().split('=')
|
v = key.strip().split('=')
|
||||||
if len(v) > 1:
|
if len(v) > 1:
|
||||||
# Key
|
# Key
|
||||||
|
if len > 2:
|
||||||
|
# Fix the stupidities in TS3 escaping
|
||||||
|
v = [v[0], '='.join(v[1:])]
|
||||||
key, value = v
|
key, value = v
|
||||||
keys[key] = self._unescape_str(value)
|
keys[key] = self._unescape_str(value)
|
||||||
elif v[0][0] == '-':
|
elif v[0][0] == '-':
|
||||||
|
|||||||
Reference in New Issue
Block a user