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.

DragnLord's weather script

Support & discussion of released scripts, and announcements of new releases.
Post Reply
r
random2
Voice
Posts: 5
Joined: Thu Dec 18, 2008 8:00 pm

Post by random2 »

Did you change it everywhere?

Find every place that has "GET" (in capitals) and that's every place that needs to have a similar change made. I count three places. (It only *really* needs to be in one place for this to work, but I did it in all three for consistency [and the one place isn't the line number in the diff])
r
redwolf
Voice
Posts: 17
Joined: Tue Jun 26, 2007 11:24 pm

hi

Post by redwolf »

changed it in all 3 places, are you on irc at all?
i was runningh 4.2.4
is the port still 80?
r
redwolf
Voice
Posts: 17
Joined: Tue Jun 26, 2007 11:24 pm

ok now i get the following

Post by redwolf »

Tcl error [pub_wz]: can't read "outtitle": no such variable
r
redwolf
Voice
Posts: 17
Joined: Tue Jun 26, 2007 11:24 pm

is this right or wrong??

Post by redwolf »

if {[catch {puts $wzsock "GET $pn_url HTTP/1.0"} sockerr]} { puthelp "NOTICE $nick :$sockerr"; puthelp "NOTICE $nick :Try again later, look out the window till then!"; close $wzsock; return 0 }
r
random2
Voice
Posts: 5
Joined: Thu Dec 18, 2008 8:00 pm

Re: hi

Post by random2 »

redwolf wrote:changed it in all 3 places, are you on irc at all?
Laugh. No, I just edit eggdrop scripts but am nowhere on irc.
i was runningh 4.2.4
is the port still 80?
Yes.

The bit you just pasted needs to be fixed still.
r
random2
Voice
Posts: 5
Joined: Thu Dec 18, 2008 8:00 pm

Re: ok now i get the following

Post by random2 »

redwolf wrote:Tcl error [pub_wz]: can't read "outtitle": no such variable
This would be highly dependent on your input. What are you trying to get?

This looks vaguely like an error I've seen before relating to cities with multiple words, but is probably just related to any error page.

This isn't my bug, nor is it one that I caused. Try zip codes, different cities, US, international, etc.
c
cache
Master
Posts: 306
Joined: Tue Jan 10, 2006 4:59 am
Location: Mass

Post by cache »

I wonder if Dragon is still around? I tried to go to his chat room and forum as mentioned in the .tcl but its gone no longer there :x
Y
Yog
Voice
Posts: 3
Joined: Thu Dec 18, 2008 4:32 pm

Post by Yog »

@random2: Yeah I figured it'd be something like that from watching the HTTP GETs using live headers and ngrep. Was going to form those full HTTP headers and try again, but ran out of time.

As for the legal issues, who knows. I've been using this script for years and years. I think it was derived from another script. I don't think it was Murf who originally wrote it (I could be wrong about this though). I sort of remember when he took it over. Was a long time ago though, so memory may be a bit foggy. :P

I also fixed it a few times over the years and sent diffs to Murf before he stopped supporting it and Dragnlord took it over (I'm the "Jim B" that's thanked in the change logs :P ).

By the way, incith also has a wunderground script that is actively supported, and works well. It doesn't have as many features, and works a bit differently, and the output is a bit more terse, but it works. Check it out here: http://incith.com/eggdrop/
M
Moonster
Halfop
Posts: 95
Joined: Wed Nov 13, 2002 5:39 pm
Location: Manchester NH USA
Contact:

Post by Moonster »

cache wrote:I wonder if Dragon is still around? I tried to go to his chat room and forum as mentioned in the .tcl but its gone no longer there :x
Dragnlord is still around but isnt on IRC too much. He was running BCMHosting that closed its doors after an Uplink issue that brought their services to a halt. The Site that was linked in the script was also lost.

He is aware of the changes that were made via the website but whether or not he will be coming up with an update to it I dont know.
"Knowledge is Power"
BeastNH/Moonster on Undernet/EFnet IRC Network
c
cache
Master
Posts: 306
Joined: Tue Jan 10, 2006 4:59 am
Location: Mass

Post by cache »

Moonster wrote:
cache wrote:I wonder if Dragon is still around? I tried to go to his chat room and forum as mentioned in the .tcl but its gone no longer there :x
Dragnlord is still around but isnt on IRC too much. He was running BCMHosting that closed its doors after an Uplink issue that brought their services to a halt. The Site that was linked in the script was also lost.

He is aware of the changes that were made via the website but whether or not he will be coming up with an update to it I dont know.
Ok thanks, I'll wait patiently unless someone has a fix to share with us :?
h
hangtough
Voice
Posts: 1
Joined: Thu Dec 18, 2008 9:31 am

Post by hangtough »

I prefer Dragnlord's script, but I got this Weather v2112 and it was simple enough and works.

Weather v2112
http://www.egghelp.org/cgi-bin/tcl_arch ... ad&id=1365

I'd much rather have the original. I will patiently wait as well. 8)
s
stoneone
Voice
Posts: 6
Joined: Fri Dec 19, 2008 6:51 pm

Post by stoneone »

Dragonlords script will work with the fixes mentioned before. My 4.2.4 had the mtemp problem and the outtitle problems also. For clarification the patches I made are shown below:

Line 878:
puts $wzsock "GET $pn_url HTTP/1.0"
puts $wzsock "Host: www.wunderground.com"
puts $wzsock "Cookie: Units=both"
puts $wzsock ""
flush $wzsock

where before it was only:
puts $wzsock "GET $pn_url"
flush $wzsock

also line 745:
if {[catch {puts $wzsock "GET $webpage HTTP/1.0"; puts $wzsock "Host: www.wunderground.com"; puts $wzsock "Cookie: Units=both"; puts $wzsock ""} sockerr]} { puthelp "NOTICE $nick :$sockerr"; puthelp "NOTICE $nick :Try again later, look out the window till then!"; close $wzsock; return 0 }
flush $wzsock


where before it was:
if {[catch {puts $wzsock "GET $webpage"} sockerr]} { puthelp "NOTICE $nick :$sockerr"; puthelp "NOTICE $nick :Try again later, look out the window till then!"; close $wzsock; return 0 }
flush $wzsock

Thanks.

Edit: Changed line 745 to execute as catch block.
Last edited by stoneone on Fri Dec 19, 2008 8:07 pm, edited 3 times in total.
User avatar
Suntop
Voice
Posts: 6
Joined: Fri Dec 19, 2008 6:41 pm

Post by Suntop »

I hope he will come along and fix it :)

I looked at the code, but dont know how to code with websites :?
--==> Wizard Suntop <==--
s
stoneone
Voice
Posts: 6
Joined: Fri Dec 19, 2008 6:51 pm

Post by stoneone »

Just make the changes to the .tcl file that I mentioned, .rehash, and it will work just fine.
r
random2
Voice
Posts: 5
Joined: Thu Dec 18, 2008 8:00 pm

Post by random2 »

stoneone, the 745 fix needs to be inside the catch block (yep, in that big now-one-longer-line -- side note, the original coding style and back in weather4 even was better). Otherwise if there's a problem, you'll be writing to the closed socket. It needs to go right after the "GET ...".

The inconsistencies in the coding style here (look at the difference in all three of the places "GET" is in the code makes this rather unmaintainable code.

The script hangtough mentioned is, like this one, also a successor to murf's. If you want the "original" go back to murf's. :P I've looked at that one as well. I'm not fond of the output format of that one either, but note that the parser on that one is better (it looks at the properties of the html, sort of the way you would in XML [simplified explanation]) rather than the structure of the page. It also didn't need to be updated for this page breakage. :)
Last edited by random2 on Fri Dec 19, 2008 7:20 pm, edited 1 time in total.
Post Reply