]> git.donarmstrong.com Git - infobot.git/commitdiff
moved a few lines from CommandStubs.pl here
authordms <dms@c11ca15a-4712-0410-83d8-924469b57eb5>
Sun, 24 Sep 2000 11:51:21 +0000 (11:51 +0000)
committerdms <dms@c11ca15a-4712-0410-83d8-924469b57eb5>
Sun, 24 Sep 2000 11:51:21 +0000 (11:51 +0000)
git-svn-id: https://svn.code.sf.net/p/infobot/code/trunk@139 c11ca15a-4712-0410-83d8-924469b57eb5

blootbot/src/Modules/Dict.pl

index 3e613a58361425ed82cad08740a23e42dc36bab4..1450107ec85ee30bea49af60098eb036d187e2c4 100644 (file)
@@ -1,7 +1,7 @@
 #
 #  Dict.pl: Frontend to dict.org.
 #   Author: dms
-#  Version: v0.6b (19991224).
+#  Version: v0.6c (20000924).
 #  Created: 19990914.
 #
 
@@ -22,6 +22,12 @@ sub Dict {
     my $socket = new IO::Socket;
     my @results;
 
+    for ($query) {
+       s/^[\s\t]+//;
+       s/[\s\t]+$//;
+       s/[\s\t]+/ /;
+    }
+
     # connect.
     socket($socket, PF_INET, SOCK_STREAM, $proto) or return "error: socket: $!";
     eval {