mirror of
https://github.com/perlbot/perlbuut
synced 2025-06-07 22:15:45 -04:00
made it remove common stuff
This commit is contained in:
parent
2039610fae
commit
ec37fa7c0a
1 changed files with 3 additions and 2 deletions
|
@ -39,10 +39,11 @@ sub {
|
||||||
{
|
{
|
||||||
@a = split(/(?:\bor\b|\s*,\s*)/, $said->{body});
|
@a = split(/(?:\bor\b|\s*,\s*)/, $said->{body});
|
||||||
}
|
}
|
||||||
|
|
||||||
s/^\s*//, s/\s*\?\s*$// for @a; #trim them up
|
s/^\s*//, s/\s*\?\s*$// for @a; #trim them up
|
||||||
|
|
||||||
$common = $findcommon->(@a);
|
$common = $findcommon->(@a);
|
||||||
|
s/^$common// for @a; # remove the common stuff for grammar
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
|
@ -68,7 +69,7 @@ sub {
|
||||||
"As I see it, yes");
|
"As I see it, yes");
|
||||||
}
|
}
|
||||||
|
|
||||||
print $a[rand@a]." $common."
|
print $a[rand@a]."."
|
||||||
}
|
}
|
||||||
|
|
||||||
__DATA__
|
__DATA__
|
||||||
|
|
Loading…
Add table
Reference in a new issue