From d6ecf1939f0d966225518dc550dd6b8a4262e257 Mon Sep 17 00:00:00 2001 From: yvesf Date: Fri, 12 Jun 2009 05:45:25 +0000 Subject: megahalbot git-svn-id: http://xapek.org/svn/common/omegle@1126 d0e8fea9-7529-0410-93fb-d39fd5b9c1dd --- megahal_bot.py | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) (limited to 'megahal_bot.py') 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] -- cgit v1.2.1