diff options
Diffstat (limited to 'megahal_bot.py')
-rw-r--r-- | megahal_bot.py | 9 |
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] |