Removed outputte Dateien:

This commit is contained in:
Tim Windelschmidt 2015-11-13 20:22:20 +01:00
parent 4900a2154a
commit b20bfcd734
3 changed files with 11 additions and 17 deletions

View File

@ -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)
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'])

View File

@ -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:

View File

@ -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();