Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 9 additions & 0 deletions ts3.chart.py
Original file line number Diff line number Diff line change
Expand Up @@ -143,6 +143,13 @@ def check(self):
self.sid = 1
self.debug("No sid specified. Using: '{0}'".format(self.sid))

try:
self.nickname = self.configuration['nickname']

except KeyError:
self.nickname = 'ts3netdata'
self.debug("No nickname specified. Using: '{0}'".format(self.nickname))

# Check once if TS3 is running when host is localhost.
if self.host in ['localhost', '127.0.0.1']:
TS3_running = False
Expand Down Expand Up @@ -182,6 +189,8 @@ def _send(self, request=None):
self._receive()
self._sock.send("use sid={0}\n".format(self.sid).encode())
self._receive()
self._sock.send("clientupdate client_nickname={0}\n".format(self.nickname).encode())
self._receive()
self.loggedIn = True
self._sock.send(self.request)

Expand Down
2 changes: 2 additions & 0 deletions ts3.conf
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@ local:
# host: '127.0.0.1'
# port: 10011
# sid: 1
# nickname: 'ts3netdata'
user: ''
pass: ''

Expand All @@ -23,5 +24,6 @@ local:
# host: '123.456.789.0'
# port: 10011
# sid: 1
# nickname: 'ts3netdata'
# user: ''
# pass: ''