| Bot-BasicBot-Pluggable-Module-Search documentation | Contained in the Bot-BasicBot-Pluggable-Module-Search distribution. |
Bot::BasicBot::Pluggable::Module::Hyperarchive - give the url of search on Hyperarchive
This is almost useless but it's provided as part of Infobot backwards compatability.
hyperarchive (for ) <word>
Simon Wistow, <simon@thegestalt.org>
Copyright 2005, Simon Wistow
Distributed under the same terms as Perl itself.
| Bot-BasicBot-Pluggable-Module-Search documentation | Contained in the Bot-BasicBot-Pluggable-Module-Search distribution. |
package Bot::BasicBot::Pluggable::Module::Hyperarchive; use strict; use Bot::BasicBot::Pluggable::Module; use base qw(Bot::BasicBot::Pluggable::Module); sub said { my ($self, $mess, $pri) = @_; my $body = $mess->{body}; my $who = $mess->{who}; return unless ($pri == 2); return unless $body =~ s!^\s*hyperarchive (for )?!!i; return "You must supply a word" unless $body =~ /\w+/; my $q = $body; $q =~ s/\W+/+/g; return "$body may be sought at http://hyperarchive.lcs.mit.edu/cgi-bin/NewSearch?key=$q"; } sub help { return "Commands: 'hyperarchive (for ) <word>'"; } 1;