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. # All rights reserved.
### ###
from threading import Event, Thread from threading import Event, Thread
import os
import subprocess import subprocess
import supybot.utils as utils import supybot.utils as utils
from supybot.commands import * from supybot.commands import *
@ -18,10 +19,7 @@ class Flipdot(callbacks.Plugin):
self.__parent = super(Flipdot, self) self.__parent = super(Flipdot, self)
self.__parent.__init__(irc) self.__parent.__init__(irc)
def text(self, irc, msg, args): def showtext(self, irc, msg, args, text):
irc.reply("Zeigen nun: " + "Wer das liest ist doof") #irc.reply("Zeigen nun: " + text)
conn = httplib.HTTPConnection("raum.ctdo.de:8000") os.system("curl raum.ctdo.de:8000 -F " + '"text=' + text + '"')
conn.request("POST", "text=" + "Wer das liest ist doof") showtext = wrap(showtext, ['text'])
response = conn.getresponse()
conn.close()
text = wrap(text)

View File

@ -1,8 +1,6 @@
### ###
# Copyright (c) 2011, Fuck You # Copyright (c) 2015, fionera
# All rights reserved. # All rights reserved.
#
#
### ###
import supybot.conf as conf import supybot.conf as conf
@ -18,10 +16,5 @@ def configure(advanced):
Lampel = conf.registerPlugin('Lampel') 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: # vim:set shiftwidth=4 tabstop=4 expandtab textwidth=79:

View File

@ -83,6 +83,9 @@ class Lampel(callbacks.Plugin):
gruengelb = wrap(gelbgruen) gruengelb = wrap(gelbgruen)
greenyellow = wrap(gelbgruen) greenyellow = wrap(gelbgruen)
def aus(self, irc, msg, args): 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.open(self.registryValue('host'), self.registryValue('port'))
ampel.connection.write("io set port 2 00\n") ampel.connection.write("io set port 2 00\n")
ampel.connection.close() ampel.connection.close()
@ -124,13 +127,13 @@ class Lampel(callbacks.Plugin):
moo = wrap(moo) moo = wrap(moo)
def disco(self, irc, msg, args): def disco(self, irc, msg, args):
if not self.discoan: 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 = meinTimer(2, self.discof, 0, [irc])
self.discoTimer.daemon = True self.discoTimer.daemon = True
self.discoan = True self.discoan = True
self.discoTimer.start() self.discoTimer.start()
else: else:
irc.reply("The Party is over") #irc.reply("The Party is over")
self.discoTimer.cancel() self.discoTimer.cancel()
self.discoan = False self.discoan = False
self.aus(); self.aus();