From a4af22157105035b4e32fc32a602ef1039294f52 Mon Sep 17 00:00:00 2001 From: MKzero Date: Mon, 2 Nov 2015 11:12:48 +0100 Subject: [PATCH 1/4] Removed unused, empty usercound plugin --- plugins/usercount.py | 11 ----------- 1 file changed, 11 deletions(-) delete mode 100644 plugins/usercount.py diff --git a/plugins/usercount.py b/plugins/usercount.py deleted file mode 100644 index 67b2a67..0000000 --- a/plugins/usercount.py +++ /dev/null @@ -1,11 +0,0 @@ -#!/usr/bin/env python2 -# -*- coding: utf-8 -*- - -from plugins.plugin import Plugin -from twisted.python import log -from bytebot_log import LOG_WARN - -class usercount(Plugin): - def __init__(self): - log.msg("Usercount not implemented yet", level=LOG_WARN) - pass From c90ab2ea7b4577d017dce11f469175bb81e13f4d Mon Sep 17 00:00:00 2001 From: MKzero Date: Mon, 2 Nov 2015 11:13:24 +0100 Subject: [PATCH 2/4] Ordered imports for spacestatus plugin --- plugins/spacestatus.py | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/plugins/spacestatus.py b/plugins/spacestatus.py index 0d040f1..1fc4817 100644 --- a/plugins/spacestatus.py +++ b/plugins/spacestatus.py @@ -1,11 +1,12 @@ #!/usr/bin/env python2 # -*- coding: utf-8 -*- -from bytebot_config import BYTEBOT_PLUGIN_CONFIG -from plugins.plugin import Plugin +import json + from urllib import urlopen -import json +from bytebot_config import BYTEBOT_PLUGIN_CONFIG +from plugins.plugin import Plugin class spacestatus(Plugin): From 7f3fbed8ce38c6a2c32367e3360d26dd18e16734 Mon Sep 17 00:00:00 2001 From: MKzero Date: Mon, 2 Nov 2015 11:14:12 +0100 Subject: [PATCH 3/4] More consistent indents --- plugins/spacestatus.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/plugins/spacestatus.py b/plugins/spacestatus.py index 1fc4817..ea3cb16 100644 --- a/plugins/spacestatus.py +++ b/plugins/spacestatus.py @@ -41,8 +41,8 @@ def onPrivmsg(self, irc, msg, channel, user): 'people_now_present'][0] if data['value'] > 0: - irc.msg(channel, 'Space users: ' + - str(', '.join(data['names']))) + irc.msg(channel, + 'Space users: ' + str(', '.join(data['names']))) elif data['value'] == 0: irc.msg(channel, 'Scheinbar ist niemand im Space :(') else: From 7bd11c777187c9ceffd1af15c37d019c85aafe19 Mon Sep 17 00:00:00 2001 From: MKzero Date: Mon, 2 Nov 2015 11:14:44 +0100 Subject: [PATCH 4/4] Removed unneccessary exception printing --- plugins/spacestatus.py | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/plugins/spacestatus.py b/plugins/spacestatus.py index ea3cb16..e5532a8 100644 --- a/plugins/spacestatus.py +++ b/plugins/spacestatus.py @@ -48,6 +48,5 @@ def onPrivmsg(self, irc, msg, channel, user): else: irc.msg(channel, 'Ich bin mir nicht sicher, ob jemand da ist') - except Exception as e: - print(e) + except Exception: irc.msg(channel, '\tFehler beim Abrufen der User')