chiark / gitweb /
Fix up /j cmd
authorIan Jackson <ian@liberator.relativity.greenend.org.uk>
Sat, 16 Jan 2010 15:20:16 +0000 (15:20 +0000)
committerIan Jackson <ian@liberator.relativity.greenend.org.uk>
Sat, 16 Jan 2010 18:53:40 +0000 (18:53 +0000)
yoweb-scrape

index 3ef8760..840a6d9 100755 (executable)
@@ -794,8 +794,8 @@ class ChatLogTracker:
 
                        if cmd == 'a': each = self._onboard_event
                        elif cmd == 'd': each = disembark
-                       else: each = lambda v,ts,tt,h: self._onboard_event(
-                                       None,ts,tt,h, jobber='applied')
+                       else: each = lambda *l: self._onboard_event(*l,
+                                       **{'jobber':'applied'})
 
                        if cmdr == self._myself.name:
                                dml.append('self')
@@ -804,10 +804,16 @@ class ChatLogTracker:
                                dml.append('other')
                                how = 'cmd: %s %s' % (cmd,cmdr)
 
-                       v = self._find_matching_vessel(
-                               pattern, timestamp, cmdr, dml, create=True)
+                       if cmd == 'j':
+                               if pattern is not None:
+                                       return chat(chan)
+                               v = None
+                       else:
+                               v = self._find_matching_vessel(
+                                       pattern, timestamp, cmdr,
+                                       dml, create=True)
 
-                       if v is not None:
+                       if cmd == 'j' or v is not None:
                                targets = targets.strip().split(' ')
                                dml.append(`len(targets)`)
                                for target in targets: