remove duplicate code in tsstats.log.parse_logs
* bump version to 0.2.4
This commit is contained in:
parent
61421c588a
commit
4bb7553f64
|
@ -56,7 +56,7 @@ author = 'Thor77'
|
||||||
# The short X.Y version.
|
# The short X.Y version.
|
||||||
version = '0.2'
|
version = '0.2'
|
||||||
# The full version, including alpha/beta/rc tags.
|
# The full version, including alpha/beta/rc tags.
|
||||||
release = '0.2.3'
|
release = '0.2.4'
|
||||||
|
|
||||||
# The language for content autogenerated by Sphinx. Refer to documentation
|
# The language for content autogenerated by Sphinx. Refer to documentation
|
||||||
# for a list of supported languages.
|
# for a list of supported languages.
|
||||||
|
|
2
setup.py
2
setup.py
|
@ -2,7 +2,7 @@ from setuptools import setup
|
||||||
|
|
||||||
setup(
|
setup(
|
||||||
name='tsstats',
|
name='tsstats',
|
||||||
version='0.2.3',
|
version='0.2.4',
|
||||||
author='Thor77',
|
author='Thor77',
|
||||||
author_email='thor77@thor77.org',
|
author_email='thor77@thor77.org',
|
||||||
description='A simple Teamspeak stats-generator',
|
description='A simple Teamspeak stats-generator',
|
||||||
|
|
|
@ -33,11 +33,10 @@ def parse_logs(log_path, ident_map=None):
|
||||||
data = '|'.join(parts[4:]).strip()
|
data = '|'.join(parts[4:]).strip()
|
||||||
if data.startswith('client'):
|
if data.startswith('client'):
|
||||||
nick, clid = re_dis_connect.findall(data)[0]
|
nick, clid = re_dis_connect.findall(data)[0]
|
||||||
|
client = clients.setdefault(clid, Client(clid, nick))
|
||||||
if data.startswith('client connected'):
|
if data.startswith('client connected'):
|
||||||
client = clients.setdefault(clid, Client(clid, nick))
|
|
||||||
client.connect(logdatetime)
|
client.connect(logdatetime)
|
||||||
elif data.startswith('client disconnected'):
|
elif data.startswith('client disconnected'):
|
||||||
client = clients.setdefault(clid, Client(clid, nick))
|
|
||||||
client.disconnect(logdatetime)
|
client.disconnect(logdatetime)
|
||||||
if 'invokeruid' in data:
|
if 'invokeruid' in data:
|
||||||
re_disconnect_data = re_disconnect_invoker.findall(
|
re_disconnect_data = re_disconnect_invoker.findall(
|
||||||
|
|
Loading…
Reference in New Issue