- if cmdr == self._myself.name: how = 'manual: /%s' % cmd
- else: how = '/%s %s' % (cmd,cmdr)
- if cmd == 'a': each = ob_x
- else: each = lambda who,how: disembark(
- self._v, timestamp, who, how)
-
- if vn is not None:
- vn = vn.title()
- if not regexp.match(
- '(?:.* )?' + vn + '$',
- self._vessel):
- return chat('/%s %s:' % (cmd,vn))
-
- for target in targets.split(' '):
- if not target: continue
- each(target.title(), how)
- return d('/%s' % cmd)
+ if cmd == 'a': each = self._onboard_event
+ else: each = disembark
+
+ if cmdr == self._myself.name:
+ dml.append('self')
+ how = 'manual: /%s' % cmd
+ else:
+ dml.append('other')
+ how = '/%s %s' % (cmd,cmdr)
+
+ v = None
+ if vn is not None and len(vn.split(' ')) == 2:
+ v = self._update_vessel_lookup(
+ vn.title(), timestamp, dml)
+ elif self._v is None:
+ dml.append('no-current')
+ elif vn is None:
+ dml.append('current')
+ v = self._v
+ elif regexp.match('(?:.* )?%s$' % vn.title(),
+ self._vessel):
+ dml.append('match')
+ v = self._v
+ else:
+ dml.append('unk-abbrev')
+
+ if v is None:
+ return d(' '.join(dml))
+
+ targets = targets.strip().split(' ')
+ dml.append(`len(targets)`)
+ for target in targets:
+ each(v, timestamp, target.title(), how)
+
+ return d(' '.join(dml))