From ecdc8e079fceb99e8cf70600f032b6095cfc2db5 Mon Sep 17 00:00:00 2001 From: Eevee Date: Thu, 4 Feb 2010 23:16:48 -0800 Subject: [PATCH] NetHack plugin now links to izchak instead of dumplogs. --- plugins/NetHack/plugin.py | 25 +++---------------------- 1 file changed, 3 insertions(+), 22 deletions(-) diff --git a/plugins/NetHack/plugin.py b/plugins/NetHack/plugin.py index 05d78db..f0926f5 100644 --- a/plugins/NetHack/plugin.py +++ b/plugins/NetHack/plugin.py @@ -162,8 +162,8 @@ def livelog_announcement(livelog): report_template = "{name} ({role} {race} {gender_delta} {align_delta}): " \ "{death} on {level_desc}. {points} points in {turns} turns, " \ - "wasting {realtime_pretty}. {dumplog}" - + "wasting {realtime_pretty}. " \ + "http://nethack.veekun.com/players/{name}/games/{endtime}" CONFIG_PLAYGROUND = '/opt/nethack.veekun.com/nethack/var' CONFIG_USERDATA_FILE = '/opt/nethack.veekun.com/dgldir/userdata' @@ -204,26 +204,7 @@ class NetHack(callbacks.Plugin): line = self.xlog.readline() if line: data = parse_xlog(line) - - # Find dumplog - dumplog_paths = glob( - os.path.join(CONFIG_USERDATA_FILE, - data['name'], - 'dumplog', - data['starttime']) - + '*' - ) - if dumplog_paths: - (_, dumplog_file) = os.path.split(dumplog_paths[0]) - dumplog_url = '{base}/{name}/dumplog/{file}'.format( - base=CONFIG_USERDATA_WEB, - name=data['name'], - file=dumplog_file, - ) - else: - dumplog_url = "Can't find dumplog :(" - - report = report_template.format(dumplog=dumplog_url, **data) + report = report_template.format(**data) msg = ircmsgs.privmsg(CONFIG_CHANNEL, report) irc.queueMsg(msg) -- 2.7.4