if (word(2 $loadinfo()) != [pf]) { load -pf $word(1 $loadinfo()); return; }; # Copyright (c) 2004 BlackJac@EFNet # # Version: 1.2.2004.09.19.1 # # This script will check the current weather conditions according # to http://www.weatherroom.com/ and display the results on your # status bar. /weather will force an immediate update or let you # see the weather conditions for other locations. /forecast will # display the forecast. # # In order to see the current weather conditions on your status # bar, you must put %{0}3 in your STATUS_FORMAT, STATUS_FORMAT1 # or STATUS_FORMAT2 setting. package weather; # Default zip code (US only) or ICAO code to use (see the complete list # of ICAO codes at http://www.airport-technology.com/icao-codes/): assign WEATHER_CODE KNYC; # Display current weather conditions on the status bar: assign WEATHER_STATUSBAR 1; # Wait this number of seconds since the last status bar update before # performing another update: assign WEATHER_UPDATE 900; # Format of current weather conditions status bar indicator (only mod- # ify this if you know what you are doing!): set STATUS_USER3 \${weather && WEATHER_STATUSBAR ? [\[Weather\: $word(0 $after(-1 # $weather))°F, $after(# $before(-1 # $weather))\]] : []}; # This must be set to ON to properly display the current weather con- # ditions on your status bar: set STATUS_DOES_EXPANDOS on; alias forecast (code default "$WEATHER_CODE", void) { if (isnumber($code)) { ^on ^dcc_raw "% weatherroom.com E 80" #; if (:connect = connect(weatherroom.com 80)) { @ weather.forecast = code; ^on ^dcc_raw "$connect weatherroom.com C" { @ weather.forecast = []; ^on dcc_raw -"$0 weatherroom.com D *"; ^on dcc_raw -"$0 weatherroom.com C"; }; ^on ^dcc_raw "$connect weatherroom.com D *" #; ^on ^dcc_raw "$connect weatherroom.com D