[SimBot-commits] CVS: simbot/plugins rss.pl,1.70,1.71
Status: Abandoned
Brought to you by:
kstange
|
From: Pete P. <fou...@us...> - 2006-01-19 13:50:36
|
Update of /cvsroot/simbot/simbot/plugins In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv28323/plugins Modified Files: rss.pl Log Message: Sanity check. We'll no longer announce the entire damn feed when the URL format changes or SimBot gets otherwise confused. Index: rss.pl =================================================================== RCS file: /cvsroot/simbot/simbot/plugins/rss.pl,v retrieving revision 1.70 retrieving revision 1.71 diff -u -d -p -r1.70 -r1.71 --- rss.pl 10 Nov 2005 13:02:15 -0000 1.70 +++ rss.pl 19 Jan 2006 13:50:06 -0000 1.71 @@ -12,7 +12,7 @@ # * DBI, DBM::SQLite # # COPYRIGHT: -# Copyright (C) 2004-05, Pete Pearson <http://fourohfour.info/> +# Copyright (C) 2004-06, Pete Pearson <http://fourohfour.info/> # # This program is free software; you can redistribute and/or modify it # under the terms of version 2 of the GNU General Public License as @@ -364,8 +364,13 @@ sub got_response { &SimBot::send_message(CHANNEL, &SimBot::parse_style(&colorize_feed($feed_name) . " has been updated! Here's what's new:")); + my $postCount=0; foreach(@newPosts) { - &SimBot::send_message(CHANNEL, $_); + if(++$postCount<=5) { + &SimBot::send_message(CHANNEL, $_); + } else { + last; + } } } } |