From 4d3174a853d79e278d81345057e7cc89dd152048 Mon Sep 17 00:00:00 2001 From: Ian Jackson Date: Sun, 17 May 2009 11:06:38 +0100 Subject: [PATCH 1/1] ChatLogTracker.chatline::disembark takes vessel and timestamp arguments --- yoweb-scrape | 13 ++++++++----- 1 file changed, 8 insertions(+), 5 deletions(-) diff --git a/yoweb-scrape b/yoweb-scrape index 93ce317..0ceeaa1 100755 --- a/yoweb-scrape +++ b/yoweb-scrape @@ -523,9 +523,10 @@ class ChatLogTracker: def ob1(did): ob_x(m.group(1), did); return d(did) def oba(did): return ob1('%s %s' % (did, m.group(2))) - def disembark(pirate, event): - ob_x(pirate, 'leaving '+event) - del self._v[pirate] + def disembark(v, timestamp, pirate, event): + self._onboard_event( + v, timestamp, pirate, 'leaving '+event) + del v[pirate] del self._pl[pirate] m = rm('Going aboard the (\\S.*\\S)\\.\\.\\.$') @@ -579,7 +580,8 @@ class ChatLogTracker: if cmdr == self._myself.name: how = 'manual: /%s' % cmd else: how = '/%s %s' % (cmd,cmdr) if cmd == 'a': each = ob_x - else: each = disembark + else: each = lambda who,how: disembark( + self._v, timestamp, who, how) if vn is not None: vn = vn.title() @@ -626,7 +628,8 @@ class ChatLogTracker: m = rm('(\\w+) has left the vessel\.') if m: - disembark(m.group(1), 'disembarked') + pirate = m.group(1) + disembark(self._v, timestamp, pirate, 'disembarked') return d('disembarked') return d('not matched') -- 2.30.2