This was to help quench all the armchair daytraders on the channels I
frequent, and, honestly, to keep people from doing ugly multiline pastes
of quotes off a webpage.

This uses the Perl Module Finance::YahooQuote, which can be downloaded
from your favorite CPAN mirror. This connects to quote.yahoo.com and
reflects data at least 15 minutes delayed, per SEC rules.

No, there's nothing in there to look up a stock ticker by name, but if
anyone hacks it, PLEASE let me know.

Two commands.

!quote msft

gives

<bot> MSFT LAST: 90.875 -1.5 (-1.62%) MICROSOFT CP

which is ticker, last traded price, change today, percent change today,
and name of company.

You can string multiple tickers together on one line like this

!quote msft dell ibm rhat

<bot> MSFT LAST: 90.875 -1.5 (-1.62%) MICROSOFT CP
<bot> DELL LAST: 38.375 -1.1875 (-3.00%) DELL COMPUTER
<bot> IBM LAST: 93 -2.5 (-2.62%) INTL BUS MACHINE
<bot> RHAT LAST: 85.875 -4.75 (-5.24%) RED HAT INC

you can also get more information using lquote.

!lquote ge

<bot> GE LAST: 128.4375 +2.8125 (+2.24%) GENERAL ELEC CO
<bot> GE VOL: 4315600 52wkRange: 84.0625 - 127.25 P/E: 40.52
<bot> GE DayRange: 125.3125 - 128.4375 Div/Share: 1.40

This shows just 10 of the 21 items that Finance::YahooQuote returns. Check
the code near the bottom, it should be fairly obvious how you can
customize the output.

Future Changes:

	1) I may restrict lquote to msg only, as some channels a 3 line
           bot output would be a bad thing

	2) Maybe a superquote function that shows all 21 bits of data.

	3) People think it's hilarious to !quote shakespeare. I'd like to
           create someplace where you could define a bunch of "tickers"
           where if you try to quote them, you get some arbitrary output
           instead of a blank quote.

	4) On one channel I had hacked the code so that if you asked for a
           quote of AMZN, which a friend on the channel had just
           started working for and been given a large sum of Stock options
           as a signing bonus, it would figure out the current worth of
           those options and include it in the output. I'd like to find an
           easy but SECURE way to include some arbitrary code on a per
           ticker basis, and have it's output sent to IRC.

skyhook
ct@x4.net
