From: Ian Jackson Date: Sun, 17 May 2009 01:26:55 +0000 (+0100) Subject: track-chat-log shows something if you're not on a vessel to start with. X-Git-Tag: 1.0~47 X-Git-Url: https://www.chiark.greenend.org.uk/ucgi/~yarrgweb/git?p=ypp-sc-tools.db-test.git;a=commitdiff_plain;h=ac1596d63e8e8107a58bd7a65adf46c8efabcc53 track-chat-log shows something if you're not on a vessel to start with. --- diff --git a/yoweb-scrape b/yoweb-scrape index 517d5e1..c99b2b0 100755 --- a/yoweb-scrape +++ b/yoweb-scrape @@ -433,7 +433,7 @@ class ChatLogTracker: self._lbuf = '' self._progress = [0, os.fstat(self._f.fileno()).st_size] - def _refresh(self): + def force_redisplay(self): self._need_redisplay = True def _onboard_event(self,timestamp,pirate,event): @@ -448,14 +448,14 @@ class ChatLogTracker: self._pl[pirate] = pa self._v[pirate] = pa self._v['#lastaboard'] = timestamp - self._refresh() + self.force_redisplay() return pa def _trash_vessel(self, v): for pn in v: if pn.startswith('#'): continue del self._pl[pn] - self._refresh() + self.force_redisplay() def expire_garbage(self, timestamp): for (vn,v) in list(self._vl.iteritems()): @@ -546,7 +546,7 @@ class ChatLogTracker: if pa.v is self._v: pa.last_chat_time = timestamp pa.last_chat_chan = what - self._refresh() + self.force_redisplay() return d(what+' chat') m = rm('(\\w+) (?:issued an order|ordered everyone) "') @@ -721,6 +721,8 @@ def prep_chat_log(args, bu, track.catchup(progress) opts.debug += 1 + track.force_redisplay() + return (myself, track) def do_track_chat_log(args, bu):