A bunch of stuff so you can set your own username
[mudsync.git] / mudsync / command.scm
index 31687389cf9a17af83e2f02e318d2f28b377100b..23e21dac8f85fc75645cc18620e0613dba0818d9 100644 (file)
@@ -33,6 +33,7 @@
 
             direct-command
             indir-command
+            indir-as-direct-command
             loose-direct-command
             loose-indir-command
             empty-command
                 action
                 %high-priority))
 
+(define* (indir-as-direct-command verbs action #:optional prepositions)
+  (make-command verbs
+                cmatch-indir-obj
+                (lambda* (goes-by #:key direct-obj indir-obj preposition)
+                  (if prepositions
+                      (and
+                       (member  direct-obj goes-by)
+                       (member preposition prepositions))
+                      (member direct-obj goes-by)))
+                action
+                %high-priority))
+
 (define* (loose-indir-command verbs action #:optional prepositions)
   (make-command verbs
                 cmatch-indir-obj