From efceaa1b78cea56d1e9c691fddbddc40b7357824 Mon Sep 17 00:00:00 2001 From: root Date: Fri, 13 Jun 2014 13:18:21 +0200 Subject: update bgt titlebot --- Reaktor/titlebot/commands/undo | 2 +- Reaktor/titlebot/commands/up | 2 +- Reaktor/titlebot/titlebot.py | 5 +++-- 3 files changed, 5 insertions(+), 4 deletions(-) (limited to 'Reaktor/titlebot') diff --git a/Reaktor/titlebot/commands/undo b/Reaktor/titlebot/commands/undo index a66de67f..e1b0abab 100755 --- a/Reaktor/titlebot/commands/undo +++ b/Reaktor/titlebot/commands/undo @@ -15,7 +15,7 @@ except: print("""usage: undo number (...) undos vote of one or more entries based on .list""") sys.exit(1) -voter = environ['_prefix'] +voter = environ['_prefix'].split("@")[1] voter_name = environ['_from'] for vote in votes: try: diff --git a/Reaktor/titlebot/commands/up b/Reaktor/titlebot/commands/up index 0a48bdb0..7aff5944 100755 --- a/Reaktor/titlebot/commands/up +++ b/Reaktor/titlebot/commands/up @@ -15,7 +15,7 @@ if not votes: upvotes one or more entries based on .list""") sys.exit(1) -voter = environ['_prefix'] +voter = environ['_prefix'].split("@")[1] voter_name =environ['_from'] for vote in votes: try: diff --git a/Reaktor/titlebot/titlebot.py b/Reaktor/titlebot/titlebot.py index c1eac3b0..41717484 100644 --- a/Reaktor/titlebot/titlebot.py +++ b/Reaktor/titlebot/titlebot.py @@ -6,7 +6,7 @@ debug = False # CAVEAT name should not contains regex magic name = 'bgt_titlebot' -workdir = '/tmp/state' +workdir = '/home/titlebot/state' try: mkdir(workdir) @@ -68,7 +68,8 @@ public_commands = [ # identify via direct connect { 'capname': 'identify', 'pattern': '^identify' + '\\s*(?:\\s+(?P.*))?$', - 'argv' : [ 'commands/identify' ]} + 'argv' : [ 'commands/identify' ], + 'env':{'config_filename': config_filename}} ] commands = [ default_command('reload'), -- cgit v1.2.3