summaryrefslogtreecommitdiff
path: root/megahal_bot.py
diff options
context:
space:
mode:
Diffstat (limited to 'megahal_bot.py')
-rw-r--r--megahal_bot.py20
1 files changed, 15 insertions, 5 deletions
diff --git a/megahal_bot.py b/megahal_bot.py
index 9e70505..c5a0f64 100644
--- a/megahal_bot.py
+++ b/megahal_bot.py
@@ -108,7 +108,6 @@ Argumente:
AND NOT ( message ILIKE '%www.%'
OR message ILIKE '%http%'
OR message ILIKE '%@%.%')
- ORDER BY from_ident||to_ident, send_time;
;""",
"offensive":
"""SELECT message FROM omegle_messages
@@ -125,8 +124,7 @@ Argumente:
AND LENGTH(message) < 35
AND NOT ( message ILIKE '%www.%'
OR message ILIKE '%http%'
- OR message ILIKE '%@%.%')
- ORDER BY from_ident||to_ident, send_time;""",
+ OR message ILIKE '%@%.%');""",
"offensive-large":
"""SELECT message FROM omegle_messages WHERE from_ident in (
SELECT from_ident FROM omegle_messages
@@ -144,7 +142,19 @@ Argumente:
AND NOT ( message ILIKE '%www.%'
OR message ILIKE '%http%'
OR message ILIKE '%@%.%') );""",
-
+ "serious":
+ """SELECT message
+ FROM omegle_messages om1
+ WHERE ( SELECT COUNT(*)
+ FROM omegle_messages om2
+ WHERE ( om1.from_ident = om2.from_ident
+ OR om1.to_ident = om2.from_ident)
+ AND (om1.send_time - om2.send_time > interval '-2 hours'
+ AND om1.send_time - om2.send_time < interval '2 hours')) > 25
+ AND LENGTH(message) < 30
+ AND NOT ( message ILIKE '%www.%'
+ OR message ILIKE '%http%'
+ OR message ILIKE '%@%.%');""",
}
sqlKey = "standard"
dbname = "omegle"
@@ -205,7 +215,7 @@ Argumente:
while True:
event.wait(0.5)
if event.isSet():
- print "partner"
+ print "disconnect_event set"
break
except KeyboardInterrupt:
print "CTRL-C pressed, exiting"