This is the new home of the egghelp.org community forum.
All data has been migrated (including user logins/passwords) to a new phpBB version.


For more information, see this announcement post. Click the X in the top right-corner of this box to dismiss this message.

SayWeather : Support & Updates

Support & discussion of released scripts, and announcements of new releases.
User avatar
SpiKe^^
Owner
Posts: 831
Joined: Fri May 12, 2006 10:20 pm
Location: Tennessee, USA
Contact:

SayWeather : Support & Updates

Post by SpiKe^^ »

SayWeather ver. 6.01 is the next working version of The Script Formerly Known as WunderWeather
Get it Now at the Eggdrop Tcl Archive: https://tclarchive.org/view.php?id=1793

Please test the new script and see what we think:)


You can also get SayWeather version 6.01 here.

Code: Select all

###############################################################
#  Important Notice about SayWeather ver. 6.01                #
#                                                             #
#  This is the next great version of:                         #
#  The Script Formerly Known as WunderWeather                 #
#                                                             #
#  www.wunderground.com is now the Weather Corporation and    #
#  is no longer providing free weather data to anyone!!       #
#  This version changes our weather provider to www.apixu.com #
###############################################################


###############################################################
## SayWeather  version 6.01                       25/08/2018 ##
## Original Script by (lily@disorg.net)                      ##
## Version 5.0+ updates by SpiKe^^      www.mytclscripts.com ##
##                                                           ##
## -> NEW IN VERSION 6.01 <-                                 ##
## - Changed the weather source page to www.apixu.com        ##
## - Changed script name from WunderWeather to SayWeather    ##
## - Script now requires a Free API Key from www.apixu.com   ##
## - Temporarily removed the forecast part of the reply.     ##
##     Recoded forecast will be available in next version    ##
##                                                           ##
################## - Version 5.0+ History - ###################
## VERSION 5.03  -  04/12/2017                               ##
## - Users can now set/save their default weather location.  ##
##     example:  !w set miami, fl                            ##
##     To use that saved weather location, just type:  !w    ##
##     Does Not use the Eggdrop user file (saves to a file)  ##
## - Added metric conversion of most forecast strings.       ##
## - Script now allows multiple public weather triggers.     ##
## VERSION 5.01  -  28/10/2017                               ##
## - All processes and globals are now in a namespace        ##
## - Replaced weather forecast (removed by Kiely Allen)      ##
## - Replaced metric setting (removed by Kiely &/or David)   ##
## - Added 3 new settings for removing colors and/or bolds   ##
## - Added Throttle Users - Thanks to user & speechles       ##
###############################################################

# International Weather script for Eggdrop.
# Displays in both F/C and MPH/KPH
# Will return weather from www.apixu.com
# Requires TCL8.5 or greater
# Has been tested on Eggdrop 1.8.3

# You must ".chanset #channel +weather" for each chan
# you wish to use this in.

# Usage: !w  :or: !w <input>
# Input can be <zip> <city, st> <city, country> <airport code>

###############################################################

package require http

namespace eval saywz { variable sayw
#######################################################
## - Begin Script Settings - Begin Script Settings - ##
#######################################################

# Set your Api Key from www.apixu.com (REQUIRED) #
set sayw(api_key) ""

# Command Char(s) to use for public binds
# Examples:  "!" or "."
# Or a Space Separated List: "! . ?"
set sayw(cmdchars) "! ."

# Set public Weather Command(s) #
set sayw(cmds_wz) "w weather"

# Set route/filename for the users default weather locations #
set sayw(usrfile) "scripts/sayweather.users"

# Use Metric as the Primary in channel output?? #
# 1 = Yes, use metric as primary output. (0=no) #
set sayw(metric) 0

# Use Color Changing Temperatures?? (1=yes 0=no) #
set sayw(colortemp) 1

# Use SayWeather Logo Color?? (1=yes 0=no)#
set sayw(colorlogo) 1

# Show Weather Item Names in Bold?? (1=yes 0=no) #
set sayw(boldnames) 1

# Amount user can issue before Throttle
set sayw(throttle_max) 2

# Throttle time (seconds)
set sayw(throttle_time) 30

# Set udef flag used to enable this script by channel
# Use:  .chanset #channel +weather
set sayw(udef_flag) "weather"


#######################################################
#### - End Script Settings - End Script Settings - ####
#######################################################

setudef flag $sayw(udef_flag)
set sayw(cmdchars) [split [string trim $sayw(cmdchars)]]
set sayw(cmds_wz) [split [string trim $sayw(cmds_wz)]]

variable nsc [namespace current]
variable name "SayWeather"
variable ver  "6.01"
variable auth "SpiKe^^"

proc say_w {nk uh hn ch input} {  variable sayw
  if {![channel get $ch $sayw(udef_flag)]} {  return 0  }

  set input [join [lassign [split [string trim $input]] cmd]]
  set do ""
  if {[string index $cmd 0] in $sayw(cmdchars)} {
    set c [string range $cmd 1 end]
    if {[lsearch -exact -nocase $sayw(cmds_wz) $c] > -1} {  set do wz  }
  }
  if {$do eq ""} {  return 0  }
  if {[throttle $uh $nk $ch]} {  return 0  }

  set input [split [regsub -all -- {\s{2,}} [string trim $input] { }]]
  lassign [split [string trim $uh ~] @] user host
  set id [string tolower "$nk,$user,$ch"]

  variable wusers
  if {[info exists wusers($id)]} {  set wusers(updated) 1
    set wusers($id) [lreplace $wusers($id) 0 0 [unixtime]]
    set udata $wusers($id)
  } else {  set udata ""  }
  if {![llength $input] && $udata eq ""} {
    puthelp "PRIVMSG $ch :You must provide a city or zip code or set a default location"
    return 0
  }

  set opt [string tolower [lindex $input 0]]  ;  set isset 0
  if {$opt in {set -set}} {  set isset 1
    set input [lrange $input 1 end]
    if {![llength $input]} {
      if {$udata eq ""} {
        puthelp "PRIVMSG $ch :You must provide a city or zip code to set as default location"
      } else {  unset wusers($id)
        puthelp "PRIVMSG $ch :Removed all custom settings for $nk"
      }
      return 0
    }
  } elseif {![llength $input]} {  set input [lindex $udata 1]  }

  set input [join $input]
  set query [::http::formatQuery q $input]
  set addr "http://api.apixu.com/v1/current.xml?key=$sayw(api_key)&$query"
  set token [::http::geturl $addr]
  set html  [::http::data $token]  ;  ::http::cleanup $token
  #set open [open scripts/saywz.xml.txt w]; puts $open $html; close $open

  ######### Get Error Data #########
  regexp {<error>(.*?)</error>} $html - err
  if {[info exists err]} {
    regexp {<code>(.*?)</code><message>(.*?)</message>} $err - code msg

    if {$code==1006} {  puthelp "PRIVMSG $ch :$input Not Found"
    } else {  puthelp "PRIVMSG $ch :\00313Error:\003 $code - $msg"  }
    return 0
  }

  ######## Get Location Data ########
  regexp {<location>(.*?)</location>} $html - loc
  if {![info exists loc]} {
    puthelp "PRIVMSG $ch :\00313Error:\003 No Error and No Location Data??"
    return 0
  }
  foreach term {name region country lat lon localtime} {
    regexp "<$term>(.*?)</$term>" $loc - $term
    if {![info exists $term]} {  set $term ""  }
  }
  unset loc

  set where "$name, "
  if {$region ne ""} {  append where "$region, "  }
  if {[string match -nocase "*united states*" $country]} {
    append where "United States"
  } else {  append where "$country"  }

  if {$isset==1} {  set wusers(updated) 1
    puthelp "PRIVMSG $ch :Set default weather location to: $where"
    set wusers($id) [list [unixtime] [split $where]]
    return 0
  }

  ######## Get Current Data ########
  regexp {<current>(.*?)</current>} $html - curr
  if {[info exists curr]} {
    set terms [list last_updated temp_f temp_c is_day text wind_mph wind_kph]
    lappend terms wind_dir pressure_in pressure_mb precip_in precip_mm
    lappend terms humidity cloud feelslike_f feelslike_c vis_miles vis_km

    foreach term $terms {
      regexp "<$term>(.*?)</$term>" $curr - $term
      if {![info exists $term]} {  set $term ""  }
    }
    unset curr
  }

  # // Build current weather string.
  if {$sayw(boldnames)==0} {  set b ""  } else {  set b "\002"  }
  if {$sayw(colorlogo)==0} {  set logo ""  ;  set endl ""
  } else {  set logo "\00313"  ;  set endl "\003"  }
  set puttx ""

  append puttx "${b}Temperature:$b[color $temp_f $temp_c]"
  if {$sayw(metric)==1} {  append puttx " (${temp_f}F) - "
  } else {  append puttx " (${temp_c}C) - "  }

  ## if {($tempf > $windcf) && (abs($tempf - $windcf) > 1.0)} ##
  append puttx "${b}Feels like:$b[color $feelslike_f $feelslike_c]"
  if {$sayw(metric)==1} {  append puttx " (${feelslike_f}F) - "
  } else {  append puttx " (${feelslike_c}C) - "  }

  append puttx "${b}Humidity:$b ${humidity}% - ${b}Wind:$b "

  # wind_dir wind_mph wind_kph #
  if {$wind_mph < 1} {  append puttx "Calm"
  } else {  append puttx "$wind_dir @ "
    if {$sayw(metric)==1} { append puttx "${wind_kph}KPH (${wind_mph}MPH)"
    } else {  append puttx "${wind_mph}MPH (${wind_kph}KPH)"  }
  }

  # pressure_in pressure_mb #
  append puttx " - ${b}Pressure:$b "
  if {$sayw(metric)==1} { append puttx "${pressure_mb}mb (${pressure_in}in)"
  } else {  append puttx "${pressure_in}in (${pressure_mb}mb)"  }
  append puttx " - ${b}Conditions:$b $text - ${b}Updated:$b $last_updated"

  puthelp "PRIVMSG $ch :${logo}$where:$endl $puttx"
} ;# End proc say_w #


#########################################################################
# // Primary Temperature Color Changing.
# // You can change colors based on fahrenheit temperatures.
# // IRC allows only 16 colors. See mIRC color chart.
proc color {temp tempc} {  variable sayw
  set x "${temp}F"
  if {$sayw(metric)==1} {  set x "${tempc}C"  }
  if {$sayw(colortemp)==0} {  return " $x"  }
  if {$temp < 20} {  return "\00312 $x\003"  }
  if {$temp < 45} {  return "\00311 $x\003"  }
  if {$temp < 70} {  return "\00309 $x\003"  }
  if {$temp < 85} {  return "\00307 $x\003"  }
  if {$temp < 100} { return "\00304 $x\003"  }
  return "\00313 $x\003"
}

#########################################################################
# // Throttle Proc (slightly altered, super action missles) - Thanks user & speechles
# // See this post: http://forum.egghelp.org/viewtopic.php?t=9009&start=3
proc throttle {id nk ch} {  variable throttle  ;  variable sayw
  set now [clock seconds]
  if {[info exists throttle($id)] && [lindex $throttle($id) 0] > $now} {
    lassign $throttle($id) ut cnt
    if {$cnt == $sayw(throttle_max)} {
      puthelp "PRIVMSG $ch :$nk, you have been Throttled (wait [expr {$ut-$now}] secs)"
    }
    set throttle($id) [list $ut [incr cnt]]
    if {$cnt > $sayw(throttle_max)} { set id 1 } { set id 0 }
  } else {
    set throttle($id) [list [expr {$now+$sayw(throttle_time)}] 1]
    set id 0
  }
}
# // sub - clean throttled users
proc throttleclean {} {  variable throttle
  set now [clock seconds]
  foreach {id time} [array get throttle] {
    if {[lindex $time 0]<=$now} { unset throttle($id) }
  }
}

#########################################################################
proc savewusers {} {  variable wusers  ;  variable sayw
  if {![info exists wusers(updated)]} {  return  }
  unset wusers(updated)
  if {![array size wusers]} {
    file delete $sayw(usrfile)
    return
  }
  set open [open $sayw(usrfile) w]
  puts $open "array set wusers [list [array get wusers]]"
  close $open 
}

#########################################################################
proc wusersclean {} {  variable wusers
  if {![array size wusers]} {  return  }
  set old [expr {[unixtime] - (86400 * 45)}]   ;# 45 days #
  foreach {key val} [array get wusers] {
    if {$key eq "updated"} {  continue  }
    if {[lindex $val 0] <= $old} {
      unset wusers($key)
      set wusers(updated) 1
    }
  }
}

#########################################################################
proc bindtime {mn hr args} {  variable nsc
  if {$mn eq "02" && $hr in {00 12}} {  ${nsc}::wusersclean  }
  ${nsc}::savewusers
  if {[string match "*1" $mn]} {  ${nsc}::throttleclean  }
}

#########################################################################
# // Script reset (unbind/rebind all triggers).
proc w_reset {} {  variable sayw  ;  variable nsc  ;  set dead "wunder"
  foreach x {w say} { ;# remove all version 5+ binds #
    if {$x eq "w"} {  set wproc "::${dead}::*"
    } else {  set wproc "${nsc}::say_w"  }
    foreach wbind [binds $wproc] {
      lassign $wbind t f n h p
      unbind $t $f $n $p
    }
  }
  foreach char $sayw(cmdchars) {
    bind pubm - "?%~\\${char}*" $wproc
  }
  bind time - * ${nsc}::bindtime
  variable wusers
  if {[file exists "scripts/${dead}weather.users"]} {
    if {![file exists $sayw(usrfile)]} {  set newufile 1
      if {[array exists wusers]} {  unset wusers  }
      file rename "scripts/${dead}weather.users" $sayw(usrfile)
    }
  }
  if {![array exists wusers] || [info exists newufile]} {
    array set wusers ""
    if {[file exists $sayw(usrfile)]} {  source $sayw(usrfile)  }
  }
}
w_reset

putlog "\002S\002ay\002W\002eather v$ver Loaded."

} ;## - End namespace eval - End namespace eval - ##

SpiKe^^

Get BogusTrivia 2.06.4.7 at www.mytclscripts.com
or visit the New Tcl Acrhive at www.tclarchive.org
.
r
roger
Halfop
Posts: 56
Joined: Sun Jun 17, 2018 12:14 pm

VERSION 6.02

Post by roger »

hi. this is working ok, but doesn't set with zip code, which isn't a big prob but have one guy that sets his default to !w San Jacinto, California, USA

and bot responds that it is set
but when he does !w it gives him San Jacinto, Baja California, Mexico (31.46, -116.27): Partly cloudy and09 58.1F (14.5C) any ideas?


!w set 92583
You must provide a city or zip code to set as LocationID: @92583

this is what happens when trying to set with zip code

found a "fix" used airport code and it worked fine :)

thanks, have a great day
roger
User avatar
SpiKe^^
Owner
Posts: 831
Joined: Fri May 12, 2006 10:20 pm
Location: Tennessee, USA
Contact:

SayWeather ver. 6.02 -set zipcode issue

Post by SpiKe^^ »

oops

roger: Try this for me, search for this line in the script...

Code: Select all

    if {[sdigit $op2]} {  set locid "@$op2"
And replace it with this...

Code: Select all

    if {[sdigit $op2] && [string length $op2]<5} {  set locid "@$op2"
Last edited by SpiKe^^ on Sun Oct 14, 2018 8:01 pm, edited 1 time in total.
SpiKe^^

Get BogusTrivia 2.06.4.7 at www.mytclscripts.com
or visit the New Tcl Acrhive at www.tclarchive.org
.
User avatar
SpiKe^^
Owner
Posts: 831
Joined: Fri May 12, 2006 10:20 pm
Location: Tennessee, USA
Contact:

Get SayWeather ver. 6.02 at tclarchive.org

Post by SpiKe^^ »

There is a newer version of SayWeather available at the Eggdrop Tcl Archive:)

Get SayWeather ver. 6.02 at: https://tclarchive.org/view.php?id=1793

Code: Select all

Script Name:  SayWeather 
Version:      6.02
Author:       SpiKe^^
Script Date:  29/09/2018
File Name:    sayweather.zip 

Short Description:
International Weather script for Eggdrop, Based on Lilys Simple Weather. Users can now set/save multiple weather locations! Script does the current weather conditions, a 1 to 7 day forecast, world time, and more from the www.apixu.com API page. Displays in both F/C and MPH/KPH.

###############################################################
#  Important Notice about SayWeather ver. 6.02                #
#                                                             #
#  This is the next great version of:                         #
#  The Script Formerly Known as WunderWeather                 #
#                                                             #
#  www.wunderground.com is now the Weather Corporation and    #
#  is no longer providing free weather data to anyone!!       #
#  This version changes our weather provider to www.apixu.com #
###############################################################


# International Weather script for Eggdrop.
# Displays in both F/C and MPH/KPH
# Will return weather from www.apixu.com
# Requires a Free Api Key from www.apixu.com
# Requires TCL8.5 or greater
# Has been tested on Eggdrop 1.8.3

# You must ".chanset #channel +weather" for each chan
# you wish to use this in.

# Usage: !w  :or: !w <input>
# Input can be <city> <zip code> <airport code> <nick>, etc.


###############################################################
## SayWeather  version 6.02                       29/09/2018 ##
## Original Script by (lily@disorg.net)                      ##
## Version 5.0+ updates by SpiKe^^      www.mytclscripts.com ##
##                                                           ##
## -> NEW IN VERSION 6.02 <-                                 ##
## - Replaced the Weather Forecast (removed in versoin 6.01) ##
## - Script now has 3 Weather commands, the defaults are:    ##
##     !w   :Shows a Short version of the Current Weather.   ##
##     !wz  :Shows the Full Current Weather conditions.      ##
##     !w+  :Shows Full Current Weather plus 3 Day Forecast. ##
## - Script now has 2 Forecast commands, the defaults are:   ##
##     !f   :Shows a Short version of the 3 Day Forecast.    ##
##     !fc  :Shows the Full version of the 3 Day Forecast.   ##
## - Added a new Sky/Astro command, the default is: !sky     ##
## - You can specify the length of all Forecast/Sky results. ##
##     example:  !fc5 miami, fl   (5 day forecast for miami) ##
## - Added a global time & IP locator cmd, default is: !time ##
## - You can now specify a Nick as the location for commands ##
##    !ti bart      :see time at bart's saved def location.  ##
## - You can now save as many weather locations as you want: ##
##    !w set miami, fl   :set default location to miami, fl  ##
##    !w set @1 toledo   :set LocationID @01 to toledo, ohio ##
##    - To access the location saved as LocationID @01, use: ##
##    !fc5 @1       :see the 5 day forecast for toledo, ohio ##
##    - To delete the location saved as LocationID @01, use: ##
##    !w set @1     :Delete LocationID @01 (set @1 to empty) ##
## - Added command options to see/list your saved locations: ##
##    !w -see      :see the current default weather location ##
##    !w -list     :list the default & any saved LocationIDs ##
##                                                           ##
################## - Version 5.0+ History - ###################
## VERSION 6.01  -  25/08/2018                               ##
## - Changed the weather source page to www.apixu.com        ##
## - Changed script name from WunderWeather to SayWeather    ##
## - Script now requires a Free API Key from www.apixu.com   ##
## - Temporarily removed the forecast part of the reply.     ##
##     Recoded forecast will be available in next version    ##
## VERSION 5.03  -  04/12/2017                               ##
## - Users can now set/save their default weather location.  ##
##     example:  !w set miami, fl                            ##
##     To use that saved weather location, just type:  !w    ##
##     Does Not use the Eggdrop user file (saves to a file)  ##
## - Added metric conversion of most forecast strings.       ##
## - Script now allows multiple public weather triggers.     ##
## VERSION 5.01  -  28/10/2017                               ##
## - All processes and globals are now in a namespace        ##
## - Replaced weather forecast (removed by Kiely Allen)      ##
## - Replaced metric setting (removed by Kiely &/or David)   ##
## - Added 3 new settings for removing colors and/or bolds   ##
## - Added Throttle Users - Thanks to user & speechles       ##
###############################################################


package require Tcl 8.5
package require http

Get SayWeather ver. 6.02 at: https://tclarchive.org/view.php?id=1793
SpiKe^^

Get BogusTrivia 2.06.4.7 at www.mytclscripts.com
or visit the New Tcl Acrhive at www.tclarchive.org
.
r
roger
Halfop
Posts: 56
Joined: Sun Jun 17, 2018 12:14 pm

thanks

Post by roger »

:P that did the trick for the zip code, thank you very much, ppl in my chat room sure like the weather script
roger
ohh downloaded earthquake again but having troubles installing tls, but i'll get it yet lol
S
Sedition
Voice
Posts: 17
Joined: Wed Dec 14, 2011 10:04 pm
Location: Bolivia, Beni, Trinidad / DALnet

Re: thanks

Post by Sedition »

is possible change

Code: Select all

if {![channel get $ch $sayw(udef_flag)]} {  return 0  }
to read channel all

Code: Select all

set "*" #all channels
or set "#chan1 #chan2"
good I wait for all that he learns more on tcl thanks for shaping a solid group of help
r
roger
Halfop
Posts: 56
Joined: Sun Jun 17, 2018 12:14 pm

weather

Post by roger »

wouldn't .chanset #channel #channel +weather enable it in the rooms your bot is in?

not sure if it would work but i would try it lol
i just tried it and it does work
User avatar
Arnold_X-P
Master
Posts: 226
Joined: Mon Oct 30, 2006 12:19 am
Location: DALnet - Trinidad - Beni - Bolivia
Contact:

Re: weather

Post by Arnold_X-P »

hi SpiKe^^
it is possible to modify the tcl so that it works in that way

Code: Select all

set "*" #all channels
or set "#chan1 #chan2"
.:an ideal world:. www.geocities.ws/chateo/yo.htm
my programming place /server ix.scay.net:7005
User avatar
play4free2
Voice
Posts: 34
Joined: Sat Nov 23, 2013 1:42 am
Contact:

Post by play4free2 »

This should work by default for all channels the bot is on:

Code: Select all

.chanset * +weather
Last edited by play4free2 on Thu Dec 06, 2018 10:23 pm, edited 2 times in total.
Image
420-HIGHTIMES IRC Network
User avatar
SpiKe^^
Owner
Posts: 831
Joined: Fri May 12, 2006 10:20 pm
Location: Tennessee, USA
Contact:

New setting to test.

Post by SpiKe^^ »

Arnold_X-P

You should test this script patch.

Add this setting in the Script Settings area of the tcl file.

Code: Select all

# You may also choose to add perm channel(s) here, if that works better for you:) #
# Leave this empty to add all SayWeather channels using the .chanset command.
# Or a Space Separated List:  set sayw(chans) "#channel #chan2 #another"
# Or for all channels,  use:  set sayw(chans) "*"
set sayw(chans) ""


Then find this line of code in the file...

Code: Select all

  if {![channel get $ch $sayw(udef_flag)]} {  return 0  }

and replace it with these...

Code: Select all

  if {[channel get $ch $sayw(udef_flag)] || $sayw(chans) eq "*"} {  set valid 1
  } elseif {[lsearch -exact -nocase $sayw(chans) $ch] > -1} {  set valid 1  }
  if {![info exists valid]} {  return 0  }

SpiKe^^

Get BogusTrivia 2.06.4.7 at www.mytclscripts.com
or visit the New Tcl Acrhive at www.tclarchive.org
.
User avatar
play4free2
Voice
Posts: 34
Joined: Sat Nov 23, 2013 1:42 am
Contact:

Post by play4free2 »

I am having an issue with the bot when I use:

!w set 60629 I get:

You must provide a city or zip code to set as LocationID: @60629

But if I use !w set City, State it works fine.
Image
420-HIGHTIMES IRC Network
User avatar
SpiKe^^
Owner
Posts: 831
Joined: Fri May 12, 2006 10:20 pm
Location: Tennessee, USA
Contact:

Post by SpiKe^^ »

play4free2

Try adding the patch from this earlier post....

=> Posted: Sun Oct 14, 2018 7:05 pm Post subject: SayWeather ver. 6.02 -set zipcode issue
http://forum.egghelp.org/viewtopic.php? ... ht=#107104
SpiKe^^

Get BogusTrivia 2.06.4.7 at www.mytclscripts.com
or visit the New Tcl Acrhive at www.tclarchive.org
.
User avatar
Arnold_X-P
Master
Posts: 226
Joined: Mon Oct 30, 2006 12:19 am
Location: DALnet - Trinidad - Beni - Bolivia
Contact:

Post by Arnold_X-P »

thanks SpiKe^^
:)
.:an ideal world:. www.geocities.ws/chateo/yo.htm
my programming place /server ix.scay.net:7005
a
a_aa
Voice
Posts: 16
Joined: Sat May 16, 2015 10:57 am
Location: Canada

Post by a_aa »

Awesome ..... thanks SpiKe^^
User avatar
SpiKe^^
Owner
Posts: 831
Joined: Fri May 12, 2006 10:20 pm
Location: Tennessee, USA
Contact:

Get SayWeather ver. 6.03 at tclarchive.org

Post by SpiKe^^ »

There is a New Version of SayWeather available at the Eggdrop Tcl Archive:)

Get SayWeather ver. 6.03 at: https://tclarchive.org/view.php?id=1793

Code: Select all

###############################################################
# SayWeather ver. 6.03 by SpiKe^^        www.mytclscripts.com #
###############################################################

# International Weather script for Eggdrop.
# Displays in both F/C and MPH/KPH
# Will return weather from www.apixu.com
# Requires a Free Api Key from www.apixu.com
# Requires TCL8.5 or greater
# Has been tested on Eggdrop 1.8.3

# You may use ".chanset #channel +weather" for each
# channel you wish to use this in,
# Or set your SayWeather channel(s) in the script settings.

# Usage: !w  :or: !w <input>
# Input can be <city> <zip code> <airport code> <nick>, etc.


###############################################################
## SayWeather  version 6.03                       07/12/2018 ##
## Original Script by (lily@disorg.net)                      ##
## Version 5.0+ updates by SpiKe^^      www.mytclscripts.com ##
##                                                           ##
## -> NEW IN VERSION 6.03 <-                                 ##
## - Added new setting:  You may now choose to set your      ##
##     weather channels in the SayWeather Script Settings,   ##
##     Or continue to use:  .chanset #channel +weather       ##
## - Fixed the problem with adding a location by zip code.   ##
##     example: You must provide a city or zip code to       ##
##         set as LocationID: @92583   (thanks roger:)       ##
##                                                           ##
################## - Version 5.0+ History - ###################
## VERSION 6.02  -  29/09/2018                               ##
## - Replaced the Weather Forecast (removed in versoin 6.01) ##
## - Script now has 3 Weather commands, the defaults are:    ##
##     !w   :Shows a Short version of the Current Weather.   ##
##     !wz  :Shows the Full Current Weather conditions.      ##
##     !w+  :Shows Full Current Weather plus 3 Day Forecast. ##
## - Script now has 2 Forecast commands, the defaults are:   ##
##     !f   :Shows a Short version of the 3 Day Forecast.    ##
##     !fc  :Shows the Full version of the 3 Day Forecast.   ##
## - Added a new Sky/Astro command, the default is: !sky     ##
## - You can specify the length of all Forecast/Sky results. ##
##     example:  !fc5 miami, fl   (5 day forecast for miami) ##
## - Added a global time & IP locator cmd, default is: !time ##
## - You can now specify a Nick as the location for commands ##
##    !ti bart      :see time at bart's saved def location.  ##
## - You can now save as many weather locations as you want: ##
##    !w set miami, fl   :set default location to miami, fl  ##
##    !w set @1 toledo   :set LocationID @01 to toledo, ohio ##
##    - To access the location saved as LocationID @01, use: ##
##    !fc5 @1       :see the 5 day forecast for toledo, ohio ##
##    - To delete the location saved as LocationID @01, use: ##
##    !w set @1     :Delete LocationID @01 (set @1 to empty) ##
## - Added command options to see/list your saved locations: ##
##    !w -see      :see the current default weather location ##
##    !w -list     :list the default & any saved LocationIDs ##
##                                                           ##
## VERSION 6.01  -  25/08/2018                               ##
## - Changed the weather source page to www.apixu.com        ##
## - Changed script name from WunderWeather to SayWeather    ##
## - Script now requires a Free API Key from www.apixu.com   ##
## - Temporarily removed the forecast part of the reply.     ##
##     Recoded forecast will be available in next version    ##
## VERSION 5.03  -  04/12/2017                               ##
## - Users can now set/save their default weather location.  ##
##     example:  !w set miami, fl                            ##
##     To use that saved weather location, just type:  !w    ##
##     Does Not use the Eggdrop user file (saves to a file)  ##
## - Added metric conversion of most forecast strings.       ##
## - Script now allows multiple public weather triggers.     ##
## VERSION 5.01  -  28/10/2017                               ##
## - All processes and globals are now in a namespace        ##
## - Replaced weather forecast (removed by Kiely Allen)      ##
## - Replaced metric setting (removed by Kiely &/or David)   ##
## - Added 3 new settings for removing colors and/or bolds   ##
## - Added Throttle Users - Thanks to user & speechles       ##
###############################################################


package require Tcl 8.5
package require http

Get SayWeather ver. 6.03 at: https://tclarchive.org/view.php?id=1793
SpiKe^^

Get BogusTrivia 2.06.4.7 at www.mytclscripts.com
or visit the New Tcl Acrhive at www.tclarchive.org
.
Post Reply