]> dxcluster.net Git - spider.git/commitdiff
fix sh/log things to allow all search strings
authorDirk Koopman <djk@tobit.co.uk>
Mon, 20 Apr 2020 13:55:13 +0000 (14:55 +0100)
committerDirk Koopman <djk@tobit.co.uk>
Mon, 20 Apr 2020 13:55:13 +0000 (14:55 +0100)
Search strings are escaped so can't be regexes (but that could change)

cmd/show/announce.pl
cmd/show/chat.pl
cmd/show/log.pl
cmd/show/rcmd.pl
cmd/show/talk.pl

index 2820c6c7f665c0638be3cbefb9fd10b79996ceca..267d27c330a4fe47181a8a8086c8a172dee4e5b2 100644 (file)
@@ -28,6 +28,12 @@ while ($f = shift @f) {                 # next field
                next if $to;
        }
        next if $who;
+       if ($f !~ /^\d+/) {
+               ($who) = $f;
+       }
+       if ($f !~ /^\d+/) {
+               ($who) = $f;
+       }
        #($who) = $f =~ /^(\w+)/o;
 }
 
index cc251c10727f1e0e71f407e9142b977e285d2e4a..6e209e25dbd5645cccc6bad700b372b2b3e77ac8 100644 (file)
@@ -28,6 +28,9 @@ while ($f = shift @f) {                 # next field
                next if $to;
        }
        next if $who;
+       if ($f !~ /^\d+/) {
+               ($who) = $f;
+       }
 #      ($who) = $f =~ /^(\w+)/o;
 }
 
index 82356bcd390029c726efc6e91f89c9389fc6f09f..b1023f29bea726cdf5182c58e0a4af6bf82f91ba 100644 (file)
@@ -27,7 +27,7 @@ sub handle
                        ($to) = $f =~ /^(\d+)$/o if !$to;              # is it a to count?
                        next if $to;
                }
-               unless ($who) {
+               unless ($f =~ /^\d+/) {
                        $who = $f; 
                        next if $who;
                }
index 7cd02d5de7022f8738145037e649b1571af6a385..0a362075ce0005e17e549bee2d7b98c3db81eeef 100644 (file)
@@ -27,7 +27,9 @@ while ($f = shift @f) {                 # next field
                next if $to;
        }
        next if $who;
-       #($who) = $f =~ /^(\w+)/o;
+       if ($f !~ /^\d+/) {
+               ($who) = $f;
+       }
 }
 
 $to = 20 unless $to;
index 811719d7802399d6e8f9a667ddcb71abffed4bd3..6b3c4ea95a724957a2256a05ed7b70face4d1a27 100644 (file)
@@ -25,6 +25,9 @@ while ($f = shift @f) {                 # next field
                next if $to;
        }
        next if $who;
+       if ($f !~ /^\d+/) {
+               ($who) = $f;
+       }
 #      ($who) = $f =~ /^(\w+)/o;
 }