Weather client v2.4.2 for mIRC 6.3+
send comments, questions to plastic@xsintrk.net

  http://plastic.xsintrk.net/mirc/weatherclient             Weather client homepage
  http://plastic.xsintrk.net/mirc/weatherclient/faq.html    Additional documentation
  http://plastic.xsintrk.net/mirc/weatherclient/vhist.txt   The full version history
  http://mircscripts.org/comments.php?id=2010               Forum at mircscripts.org

~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
info:
  This is a small addon for checking the latest weather, it retrieves and parses an
  HTML page from wunderground.com and can display it in the active window or from a
  GUI.  It has many features, and therefore many options - so you will need at least
  a general understanding of mIRC, mIRC addons, and the IRC protocol to use it.

~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
features:
  international weather
  optional conversion to metric system
  optional GUI display
  version checker
  channel bot/support for private requests
  can send results by MSG or NOTICE
  multiple simultaneous connections
  optional popup menu

~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
install:
  1. Extract the zip to your mIRC dir (it should contain weatherclient.mrc and
     readme-weather.txt) or any mIRC subdirectory.  If you don't have mIRC, get the
     latest version at http://mirc.com and install it.
  2. Type /load -rs "[drive]:\[path]\weatherclient.mrc" at the mIRC command line.
  3. Allow the script to initialize, if you get a 'Script Warning' dialog box.
  4. Type '/wconfig' to familiarize yourself with the default settings, and follow
     the usage instructions below to configure Weather client.

~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
local commands:
  /weather.......................You may use a US zipcode, or search by city, state.
                                 The comma is not required but you must include the
                                 state, province, or country the city is in.

  /wreadme.......................Opens this readme.

  /wmetric <on|off>..............Converts the information contained in the /woutput
                                 tags <temp>, <wind>, <dewpnt>, <psi>, <clouds>, and
                                 <vis> to the metric system.  The GUI display will
                                 also be changed.

                |~~~~~~~~~~~~~~~~~~~~conversions~~~~~~~~~~~~~~~~~~~|
                | fahrenheit              |  celcius               |
                | miles                   |  kilometers            |
                | feet                    |  meters                |
                | pounds/square inch      |  kilograms/sqare cm    |
                |~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~|

  /wupdate.......................Opens a dialog to check plastic.xsintrk.net for the
                                 latest  version of weather client, with an option
                                 to view the latest readme, or download the latest
                                 version of weather client (Requires http browser).

  /wdisplay <echo|gui>...........Switch between GUI and echo weather report.
                                 The client will attempt to cascade dialogs if
                                 more than one are opened, as it would be if
                                 multiple local connections are being used.

  /wpopup <c|m|n|s|q|all|none>...Adds the client menu to the popup menu you select,
                                 where 'c' is channel, 'm' is menubar, 'n' is
                                 nicklist, 's' is status, and 'q' is query.  Multiple
                                 arguments can be set, for example: '/wpopup scm'
                                 would add the menu to status, channel, and menubar
                                 popups.  The two final arguments, 'all' and 'none',
                                 must be used independently of any other argument.

  /wconfig.......................Echos all settings to the active window.

  /wunload <yes>.................Unloads weatherclient.mrc.

~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
bot commands:

  /wpanic........................Closes weather sockets and unsets %weather.*

  /wbot <on|off>.................Enable or disable weather requests.

  /wsendtype <msg|notice>........Specify whether the bot trigger and replies operate
                                 by MSG or NOTICE.

  /wsilent <on|off>..............Send bot replies silently.

  /wmaxcon <num|unlimited>.......Sets the max number of connections.  If 'num' is not
                                 is not an integer, maxcon is set to 'unlimited',
                                 which means unlimited connections are allowed.

  /wtrigger <trigger>............Sets the trigger for weather requests.

  /wquery <on|off>...............Enable or disable additional support for requests
                                 via private MSG or NOTICE.

  /wspam <#channel|txtformat>....Spam your weather trigger.  'txtformat' configures
                                 the ad, the <tags> are below.  '#Channel' will spam
                                 the said channel with 'txtformat'.  Arguments cannot
                                 be used together.

                |~~~~~~~~~~~~~~~~~~~~~~~~tags~~~~~~~~~~~~~~~~~~~~~~|
                | <trigger>  trigger      |  <con>   max connects  |
                | <query>    query on/off |  <type>  sendtype      |
                | <chan>     spam channel |                        |
                | <k>        ctrl-k       |  <b>     ctrl-b        |
                | <u>        ctrl-u       |  <r>     ctrl-r        |
                |~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~|

  /woutput <txtformat>...........Changes the weather output by using <tags>.  'Time'
                                 shows the time the weather was recorded, in the
                                 timezone of the <loc>.  BE CAREFUL!  It takes a
                                 while to set this up, so be sure you have it right
                                 before you change from the default.

                |~~~~~~~~~~~~~~~~~~~~~~~~tags~~~~~~~~~~~~~~~~~~~~~~|
                |  <loc>     location     |  <time>   time         |
                |  <temp>    temperature  |  <cond>   condition    |
                |  <wind>    wind speed   |  <hu>     humidity     |
                |  <dewpnt>  dewpoint     |  <bp>     pressure     |
                |  <clouds>  clouds       |  <vis>    visibility   |
                |  <k>       ctrl-k       |  <b>      ctrl-b       |
                |  <u>       ctrl-u       |  <r>      ctrl-r       |
                |~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~|

  note: Enter a command with no arguments to show its current setting.  Remember
        that most of the arguments use on/off.

~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
what's new?:

  2.4 - US measurements can be converted to the metric system. (/wmetric)
        Modified the output GUI and the /woutput txtformat. (removed all references
         to miles/feet/etc, which will now be handled by the tag parser)
        Made the popup menu prettier.
        Removed the 'upcomming' section of the readme, everything is finished!

        updates:
          1 - Fixed a typo in the <bp> tag, should have been an eight in there.
              Added some primitive error checking to the /woutput tags, hopefully
               this will solve more problems than it creates ;)
          2 - I have changed the w.ini alias $shortfn($scriptdirweatherclient.ini) to
               $+($chr(34),$scriptdirweatherclient.ini,$chr(34)), which will actually
               work.  Everyone who has had trouble with Weather client not paying
               attention to your settings, this should correct it.  My excuse is, I
               was told that $shortfn would strip the space out of filepaths, and
               according to the mIRC HLP it should do that. Since my path to mIRC
               doesn't have spaces in it, I just stuck $shortfn in w.ini and thought
               it was taken care of.  However, now that I have actually checked it
               out, $shortfn was returning the full path, which didn't fix anything.
               

  It's been fun.

~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
credits:
  http://wunderground.com
  ^Andy (HTTP GET snippet)
  Peter Johnson
  visine
  wilamena
  diz
  TechMonkey