From b20bfcd734a4e60d3b4003e6097a8b3b702fef8d Mon Sep 17 00:00:00 2001 From: Tim Windelschmidt Date: Fri, 13 Nov 2015 20:22:20 +0100 Subject: [PATCH] Removed outputte Dateien: --- plugins/Flipdot/plugin.py | 12 +++++------- plugins/Lampel/config.py | 9 +-------- plugins/Lampel/plugin.py | 7 +++++-- 3 files changed, 11 insertions(+), 17 deletions(-) diff --git a/plugins/Flipdot/plugin.py b/plugins/Flipdot/plugin.py index 29e3400..ec41b69 100644 --- a/plugins/Flipdot/plugin.py +++ b/plugins/Flipdot/plugin.py @@ -3,6 +3,7 @@ # All rights reserved. ### from threading import Event, Thread +import os import subprocess import supybot.utils as utils from supybot.commands import * @@ -18,10 +19,7 @@ class Flipdot(callbacks.Plugin): self.__parent = super(Flipdot, self) self.__parent.__init__(irc) - def text(self, irc, msg, args): - irc.reply("Zeigen nun: " + "Wer das liest ist doof") - conn = httplib.HTTPConnection("raum.ctdo.de:8000") - conn.request("POST", "text=" + "Wer das liest ist doof") - response = conn.getresponse() - conn.close() - text = wrap(text) \ No newline at end of file + def showtext(self, irc, msg, args, text): + #irc.reply("Zeigen nun: " + text) + os.system("curl raum.ctdo.de:8000 -F " + '"text=' + text + '"') + showtext = wrap(showtext, ['text']) \ No newline at end of file diff --git a/plugins/Lampel/config.py b/plugins/Lampel/config.py index cde7821..3ad9668 100644 --- a/plugins/Lampel/config.py +++ b/plugins/Lampel/config.py @@ -1,8 +1,6 @@ ### -# Copyright (c) 2011, Fuck You +# Copyright (c) 2015, fionera # All rights reserved. -# -# ### import supybot.conf as conf @@ -18,10 +16,5 @@ def configure(advanced): Lampel = conf.registerPlugin('Lampel') -# This is where your configuration variables (if any) should go. For example: -conf.registerGlobalValue(Lampel, 'host', - registry.String("lampel.raum.ctdo.de", """Host of Lampel""")) -conf.registerGlobalValue(Lampel, 'port', - registry.Integer(2701, """Port number of Lampel""")) # vim:set shiftwidth=4 tabstop=4 expandtab textwidth=79: diff --git a/plugins/Lampel/plugin.py b/plugins/Lampel/plugin.py index 7ead5fa..21fa975 100644 --- a/plugins/Lampel/plugin.py +++ b/plugins/Lampel/plugin.py @@ -83,6 +83,9 @@ class Lampel(callbacks.Plugin): gruengelb = wrap(gelbgruen) greenyellow = wrap(gelbgruen) def aus(self, irc, msg, args): + if self.discoan: + self.discoTimer.cancel() + self.discoan = False ampel.connection.open(self.registryValue('host'), self.registryValue('port')) ampel.connection.write("io set port 2 00\n") ampel.connection.close() @@ -124,13 +127,13 @@ class Lampel(callbacks.Plugin): moo = wrap(moo) def disco(self, irc, msg, args): if not self.discoan: - irc.reply("And the Party begins") + #irc.reply("And the Party begins") self.discoTimer = meinTimer(2, self.discof, 0, [irc]) self.discoTimer.daemon = True self.discoan = True self.discoTimer.start() else: - irc.reply("The Party is over") + #irc.reply("The Party is over") self.discoTimer.cancel() self.discoan = False self.aus();