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)\\.\\.\\.$')
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()
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')