&addCmdHook("extra", 'httpdtype', ('CODEREF' => 'HTTPDtype::HTTPDtype',
'Identifier' => 'httpdtype', 'Cmdstats' => 'httpdtype',
'Forker' => 1) );
-
+&addCmdHook("extra", 'rss', ('CODEREF' => 'Rss::Rss',
+ 'Identifier' => 'rss', 'Cmdstats' => 'rss',
+ 'Forker' => 1, 'Help' => 'rss') );
###
### END OF ADDING HOOKS.
###
--- /dev/null
+#
+# Rss.pl: rss handler hacked from Plug.pl
+# Author: Tim Riker <Tim@Rikers.org>
+# Licensing: Artistic License (as perl itself)
+# Version: v0.1
+#
+
+package Rss;
+
+use strict;
+
+sub Rss::Titles {
+ my @list;
+
+ foreach (@_) {
+ next unless (/<title>(.*?)<\/title>/);
+ my $title = $1;
+ $title =~ s/&\;/&/g;
+ push(@list, $title);
+ }
+
+ return @list;
+}
+
+sub Rss::Rss {
+ my ($message) = @_;
+ my @results = &::getURL($message);
+ my $retval = "i could not get the rss feed.";
+
+ if (scalar @results) {
+ my $prefix = "Titles: ";
+ my @list = &Rss::Titles(@results);
+ $retval = &::formListReply(0, $prefix, @list);
+ }
+
+ &::performStrictReply($retval);
+}
+
+1;
+# vim: ts=2 sw=2
### MODULES.
%myModules = (
+ "babelfish" => "babel.pl",
+ "botmail" => "botmail.pl",
"bzflag" => "BZFlag.pl",
"countdown" => "Countdown.pl",
"debian" => "Debian.pl",
"debianExtra" => "DebianExtra.pl",
"dict" => "Dict.pl",
"dumpvars" => "DumpVars.pl",
- "symdump" => "DumpVars2.pl",
"exchange" => "Exchange.pl",
"factoids" => "Factoids.pl",
+ "httpdtype" => "HTTPDtype.pl",
+ "insult" => "insult.pl",
+ "ircdcc" => "UserDCC.pl",
"kernel" => "Kernel.pl",
- "perlMath" => "Math.pl",
"news" => "News.pl",
+ "nickometer" => "nickometer.pl",
+ "perlMath" => "Math.pl",
"plug" => "Plug.pl",
"quote" => "Quote.pl",
"rootwarn" => "RootWarn.pl",
+ "rss" => "Rss.pl",
"search" => "Search.pl",
"slashdot" => "Slashdot3.pl",
+ "symdump" => "DumpVars2.pl",
"topic" => "Topic.pl",
"units" => "Units.pl",
"uptime" => "Uptime.pl",
- "ircdcc" => "UserDCC.pl",
"userinfo" => "UserInfo.pl",
"weather" => "Weather.pl",
- "wwwsearch" => "W3Search.pl",
"whatis" => "WhatIs.pl",
"wingate" => "Wingate.pl",
- "babelfish" => "babel.pl",
- "insult" => "insult.pl",
- "nickometer" => "nickometer.pl",
+ "wwwsearch" => "W3Search.pl",
"zfi" => "zfi.pl",
"zippy" => "Zippy.pl",
"zsi" => "zsi.pl",
- "botmail" => "botmail.pl",
- "httpdtype" => "HTTPDtype.pl",
);
### THIS IS NOT LOADED ON RELOAD :(
my @myModulesLoadNow;