[SimBot-commits] CVS: simbot simbot.pl,1.113,1.114
Status: Abandoned
Brought to you by:
kstange
|
From: Kevin S. <ks...@us...> - 2005-05-05 03:29:49
|
Update of /cvsroot/simbot/simbot In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv18317 Modified Files: simbot.pl Log Message: Fix send_pieces to not split words on . and -, because it does weird things to most blocks of text, like putting the period for the sentence in a new message or splitting a decimal number. This also makes the dict plugin work better in several ways, including sending a private list of dictionaries isntead of always listing the public one. All private messages in dict.pl are now sent with notices instead. Index: simbot.pl =================================================================== RCS file: /cvsroot/simbot/simbot/simbot.pl,v retrieving revision 1.113 retrieving revision 1.114 diff -u -d -p -r1.113 -r1.114 --- simbot.pl 4 May 2005 20:03:50 -0000 1.113 +++ simbot.pl 5 May 2005 03:29:39 -0000 1.114 @@ -1457,7 +1457,7 @@ sub send_pieces { # ARG3: $text: the text to split. sub cont_send_pieces { my ($kernel, $type, $dest, $prefix, $text) = @_[KERNEL, ARG0, ARG1, ARG2, ARG3]; - my @words = split(/\b/, $text); + my @words = split(/(\b | \b)/, $text); my $line = (defined $prefix ? $prefix . ' ' : '') . shift(@words); my ($curWord); |