Browse Source

fixed broken regexp in @open and @dig

Keelan Lightfoot 8 years ago
parent
commit
1968b160dd
1 changed files with 2 additions and 2 deletions
  1. 2
    2
      execution_context.go

+ 2
- 2
execution_context.go View File

718
 func (c *ExecutionContext) openCmd(input string) {
718
 func (c *ExecutionContext) openCmd(input string) {
719
 	// @open <in1;in2;in3;etc>=#<room>,<out1;out2;out3;etc>
719
 	// @open <in1;in2;in3;etc>=#<room>,<out1;out2;out3;etc>
720
 
720
 
721
-	r, _ := regexp.Compile(`^@open\pZ+([^=]*[^=\pZ]+)\pZ*=#([0-9]+)(?:\pZ*,\pZ*([^,]*[^,\pZ]+)\pZ*)?`)
721
+	r, _ := regexp.Compile(`^@open\pZ+([^=]*[^=\pZ]{1})\pZ*=#([0-9]+)(?:\pZ*,\pZ*([^,]*[^,\pZ]{1})\pZ*)?`)
722
 	params := r.FindStringSubmatch(input)
722
 	params := r.FindStringSubmatch(input)
723
 
723
 
724
 	if params == nil {
724
 	if params == nil {
763
 	// @dig <Room name>=<in1;in2;in3;etc>,<out1;out2;out3;etc>
763
 	// @dig <Room name>=<in1;in2;in3;etc>,<out1;out2;out3;etc>
764
 	//@dig foo bar  = <F>oo;foo;f,<B>ack;back;b
764
 	//@dig foo bar  = <F>oo;foo;f,<B>ack;back;b
765
 
765
 
766
-	r, _ := regexp.Compile(`^@dig\pZ+([^=]*[^=\pZ]+)(\pZ*=\pZ*(?:([^,]*[^,\pZ]+)\pZ*)?(?:\pZ*,\pZ*([^,]*[^,\pZ]+)\pZ*)?)?`)
766
+	r, _ := regexp.Compile(`^@dig\pZ+([^=]*[^=\pZ]{1})(?:\pZ*=\pZ*(?:([^,]*[^,\pZ]{1})\pZ*)?(?:\pZ*,\pZ*([^,]*[^,\pZ]{1})\pZ*)?)?`)
767
 	params := r.FindStringSubmatch(input)
767
 	params := r.FindStringSubmatch(input)
768
 	if params == nil {
768
 	if params == nil {
769
 		return
769
 		return