summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--cholerab/news/Candidate16
-rwxr-xr-xpunani/bot/__init__.py12
2 files changed, 24 insertions, 4 deletions
diff --git a/cholerab/news/Candidate b/cholerab/news/Candidate
index a24d565b..e5b3bd50 100644
--- a/cholerab/news/Candidate
+++ b/cholerab/news/Candidate
@@ -1,4 +1,4 @@
-hosts for deletion:
+# hosts for deletion
zerg
rtjure
miefda901
@@ -11,3 +11,17 @@ temperator
miefdahome
krebsbitch
armageddon421_de
+
+# euer http pub und priv
+
+euer.krebsco.de bzw. euer.retiolum bietet ein HTTP interface an. Vorher gab es
+keinen unterschied zwischen public und private interface. nun bietet euer auf
+dem public interface eine "zensierte" version des retiolum graphen und im
+private interface den graphen inkl aller informationen welche verfuegbar sind
+an.
+
+# darkstats fuer euer
+
+auf euer laeuft auf port 8080 ein darkstat daemon, welcher informationen ueber
+den server geroutet werden. Das interface ist nur innerhalb des darknets
+verfuegbar.
diff --git a/punani/bot/__init__.py b/punani/bot/__init__.py
index 13d4c20b..4944bba0 100755
--- a/punani/bot/__init__.py
+++ b/punani/bot/__init__.py
@@ -7,6 +7,7 @@ from time import sleep, strftime, strptime
from ircbot import SingleServerIRCBot
from irclib import nm_to_n
+
class PunaniRequestHandler(BaseRequestHandler):
"""Handler for Punani messages."""
@@ -24,13 +25,17 @@ class PunaniReceiveServer(ThreadingTCPServer):
"""UDP server that waits for Punani messages."""
def __init__(self):
- ThreadingTCPServer.__init__(self, ('127.0.0.1', 5555), PunaniRequestHandler)
+ ThreadingTCPServer.__init__(self,
+ ('127.0.0.1', 5555),
+ PunaniRequestHandler)
self.queue = Queue()
+
class PunaniBot(SingleServerIRCBot):
def __init__(self, server_list, channel_list, nickname='punani-ircbot',
realname='Bob Ross'):
+ self.reconnection_interval = 30
SingleServerIRCBot.__init__(self, server_list, nickname, realname)
self.channel_list = channel_list
@@ -70,6 +75,7 @@ class PunaniBot(SingleServerIRCBot):
for channel, key in self.channel_list:
self.connection.privmsg(channel, msg)
+
def process_queue(announce_callback, queue, delay=2):
"""Process received messages in queue."""
while True:
@@ -83,7 +89,7 @@ def process_queue(announce_callback, queue, delay=2):
if __name__ == '__main__':
# Set IRC connection parameters.
irc_servers = [('supernode', 6667)]
- irc_channels = [('#retiolum','')]
+ irc_channels = [('#retiolum', '')]
# Prepare and start IRC bot.
bot = PunaniBot(irc_servers, irc_channels)
@@ -93,7 +99,7 @@ if __name__ == '__main__':
announce = bot.say
receiver = PunaniReceiveServer()
- t = Thread(target=process_queue,args=(announce,receiver.queue))
+ t = Thread(target=process_queue, args=(announce, receiver.queue))
t.daemon = True
t.start()
receiver.serve_forever()