summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authoryvesf <yvesf@d0e8fea9-7529-0410-93fb-d39fd5b9c1dd>2009-06-15 22:52:15 +0000
committeryvesf <yvesf@d0e8fea9-7529-0410-93fb-d39fd5b9c1dd>2009-06-15 22:52:15 +0000
commit39acf4974160db6b5cd490dcaa9569c1d16e2930 (patch)
tree0ca0b25e92ef16256f52720dc8527399ce1fba90
parent94c2239d2f79c1921d2ed45fe7409024fdb2cd1c (diff)
downloadomegle-39acf4974160db6b5cd490dcaa9569c1d16e2930.tar.gz
omegle-39acf4974160db6b5cd490dcaa9569c1d16e2930.zip
asd
git-svn-id: http://xapek.org/svn/common/omegle@1137 d0e8fea9-7529-0410-93fb-d39fd5b9c1dd
-rw-r--r--abfragen.sql20
-rw-r--r--megahal_bot.py3
-rw-r--r--proxy.py3
3 files changed, 24 insertions, 2 deletions
diff --git a/abfragen.sql b/abfragen.sql
new file mode 100644
index 0000000..53ba62d
--- /dev/null
+++ b/abfragen.sql
@@ -0,0 +1,20 @@
+
+-- Ausdauernde
+ SELECT a.send_time - b.send_time AS "Dauer", date_trunc('day',a.send_time)
+ FROM ( SELECT MAX(send_time) AS send_time, from_ident
+ FROM omegle_messages
+ GROUP BY from_ident ) a
+ JOIN ( SELECT MIN(send_time) AS send_time, from_ident
+ FROM omegle_messages
+ GROUP BY from_ident ) b
+ ON a.from_ident = b.from_ident
+ WHERE a.send_time - b.send_time > interval '1 hour'
+ORDER BY 1 DESC;
+
+-- Fleissigste
+ SELECT COUNT(*), from_ident, date_trunc('hour',MIN(send_time))
+ FROM omegle_messages
+GROUP BY from_ident
+ HAVING COUNT(*) > 10
+ORDER BY 1 DESC;
+
diff --git a/megahal_bot.py b/megahal_bot.py
index c5a0f64..f1f3864 100644
--- a/megahal_bot.py
+++ b/megahal_bot.py
@@ -41,6 +41,7 @@ class MegahalBot(OmegleChat):
if self.idlecount > 8:
self.logger.info("Idle > 8. disconnect()")
self.disconnect()
+ self.disconnect_event.set()
else:
self.logger.info("Idle count %s/8" % self.idlecount)
self.respond("hey?") #restart the conv.
@@ -61,7 +62,7 @@ class MegahalBot(OmegleChat):
except:
self.disconnect_event.set()
return
- time.sleep(random.randint(1,3))
+ time.sleep(random.randint(2,5))
self.respond(message,prepend="\033[1A\033[2K\033[%sD"%(len(typestr))) #move up 1; delete line; move left %s
def on_connect(self):
diff --git a/proxy.py b/proxy.py
index 26aa857..43e5a24 100644
--- a/proxy.py
+++ b/proxy.py
@@ -34,7 +34,8 @@ class OmegleProxyChat(OmegleChat):
try:
self.disconnect()
except:
- self.disconnect_event.set()
+ pass
+ self.disconnect_event.set()
else:
self.logger.info("Idle count %s/8" % self.idlecount)