summaryrefslogtreecommitdiff
path: root/megahal_bot.py
diff options
context:
space:
mode:
authoryvesf <yvesf@d0e8fea9-7529-0410-93fb-d39fd5b9c1dd>2009-06-12 05:45:25 +0000
committeryvesf <yvesf@d0e8fea9-7529-0410-93fb-d39fd5b9c1dd>2009-06-12 05:45:25 +0000
commitd6ecf1939f0d966225518dc550dd6b8a4262e257 (patch)
tree5f41f97d3f5306e38de8a47ffba599cc0c3a7023 /megahal_bot.py
parent69b06921d8d4296fc11d4c6e730122c53c1f8f55 (diff)
downloadomegle-d6ecf1939f0d966225518dc550dd6b8a4262e257.tar.gz
omegle-d6ecf1939f0d966225518dc550dd6b8a4262e257.zip
megahalbot
git-svn-id: http://xapek.org/svn/common/omegle@1126 d0e8fea9-7529-0410-93fb-d39fd5b9c1dd
Diffstat (limited to 'megahal_bot.py')
-rw-r--r--megahal_bot.py9
1 files changed, 6 insertions, 3 deletions
diff --git a/megahal_bot.py b/megahal_bot.py
index e29edf1..9e70505 100644
--- a/megahal_bot.py
+++ b/megahal_bot.py
@@ -87,12 +87,13 @@ Argumente:
--dbname=DBNAME Database (Standard: DBNAME=omegle)
-l or
--local Do local testing
+ -p NAME or
--profile=NAME Database select profile (Standard: NAME=standard)
see sourcecode""" % (sys.argv[0])
#parse args
try:
- opts, args = getopt.getopt(sys.argv[1:], "hd:l", ["help", "host=", "profile=","dbname=","local"])
+ opts, args = getopt.getopt(sys.argv[1:], "hp:d:l", ["help", "host=", "profile=","dbname=","local"])
except getopt.GetoptError,err:
print str(err)
usage()
@@ -107,6 +108,7 @@ 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
@@ -123,7 +125,8 @@ Argumente:
AND LENGTH(message) < 35
AND NOT ( message ILIKE '%www.%'
OR message ILIKE '%http%'
- OR message ILIKE '%@%.%');""",
+ OR message ILIKE '%@%.%')
+ ORDER BY from_ident||to_ident, send_time;""",
"offensive-large":
"""SELECT message FROM omegle_messages WHERE from_ident in (
SELECT from_ident FROM omegle_messages
@@ -156,7 +159,7 @@ Argumente:
local = True
elif o == "--host":
host = a
- elif o == "--profile":
+ elif o in ("-p", "--profile"):
if sql.has_key(a):
sqlKey = a
print sql[a]