remove duplicate code in tsstats.log.parse_logs

* bump version to 0.2.4
This commit is contained in:
Thor77 2016-05-19 21:53:05 +02:00
parent 61421c588a
commit 4bb7553f64
3 changed files with 3 additions and 4 deletions

View File

@ -56,7 +56,7 @@ author = 'Thor77'
# The short X.Y version.
version = '0.2'
# 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
# for a list of supported languages.

View File

@ -2,7 +2,7 @@ from setuptools import setup
setup(
name='tsstats',
version='0.2.3',
version='0.2.4',
author='Thor77',
author_email='thor77@thor77.org',
description='A simple Teamspeak stats-generator',

View File

@ -33,11 +33,10 @@ def parse_logs(log_path, ident_map=None):
data = '|'.join(parts[4:]).strip()
if data.startswith('client'):
nick, clid = re_dis_connect.findall(data)[0]
if data.startswith('client connected'):
client = clients.setdefault(clid, Client(clid, nick))
if data.startswith('client connected'):
client.connect(logdatetime)
elif data.startswith('client disconnected'):
client = clients.setdefault(clid, Client(clid, nick))
client.disconnect(logdatetime)
if 'invokeruid' in data:
re_disconnect_data = re_disconnect_invoker.findall(