From 063180ec23fa246f55f41b1079abf1d6e63db4ba Mon Sep 17 00:00:00 2001 From: Ryan Voots Date: Tue, 5 Oct 2010 13:41:21 -0400 Subject: [PATCH] fixed the common code, make it only work if we end in a whitespace --- plugins/8ball.pm | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/plugins/8ball.pm b/plugins/8ball.pm index 3ba2d9b..8c17ca6 100644 --- a/plugins/8ball.pm +++ b/plugins/8ball.pm @@ -36,7 +36,11 @@ sub { s/^\s*//, s/\s*(\?\s*)?$// for @a; #trim them up $common = $findcommon->(@a); - s/^$common// for @a; # remove the common stuff for grammar + + if ($common =~ /\s$/) #only remove if we end on whitespace + { + s/^$common// for @a; # remove the common stuff for grammar + } } else {