egghelp.org community Forum Index
[ egghelp.org home | forum home ]
egghelp.org community
Discussion of eggdrop bots, shell accounts and tcl scripts.
 
 FAQFAQ   SearchSearch   MemberlistMemberlist   UsergroupsUsergroups   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 

incith:weather (2.8p) (Dec. 18th, 2008)
Goto page Previous  1, 2, 3 ... 13, 14, 15 ... 19, 20, 21  Next
 
Post new topic   Reply to topic    egghelp.org community Forum Index -> Script Support & Releases
View previous topic :: View next topic  
Author Message
speechles
Revered One


Joined: 26 Aug 2006
Posts: 1398
Location: emerald triangle, california (coastal redwoods)

PostPosted: Sat Jun 16, 2012 5:12 pm    Post subject: Reply with quote

cache wrote:
Problem trying to get weather for Bristol UK

This is the error I get in Telnet:

[22:43] incith:weather-2.8r: <nck/#chan> .weather Bristol UK
[22:43] Tcl error [incith::weather::weather_handler]: unable to convert date-time string "January</option><option value="2">February</option><option value="3">March</option><option value="4">April</option><option value="5">May</option><option selected="selected" value="6">June</option><option value="7">July</option><option value="8">August</option><option value="9">September</option><option value="10">October</option><option value="11">Novem

Can anyone help? Thank you.


Quote:
<speechles> !wz Bristol UK
<sp33chy> speechles's weather request; Bristol Airport, United Kingdom (51.4°N/2.7°W); Updated: 9:50 PM BST (June 16, 2012); Conditions: Mostly Cloudy; Temperature: 54°F (12.2°C); High/Low: 59/50°F (15/10°C); UV: 0/16; Humidity: 88%; Dew Point: 50°F (10°C); Pressure: 29.83 in/1010 hPa; Wind: WSW at 16 MPH (26 KPH)


Are you using Incith:Weather 2.9a? This is the version I am using above. This is not the version found of the archive. This is a special egghelp forum edition for those brave enough to wander into this thread and find it. Enjoys Smile
_________________
speechles' eggdrop tcl archive


Last edited by speechles on Sun Jun 17, 2012 1:33 am; edited 1 time in total
Back to top
View user's profile Send private message
cache
Master


Joined: 10 Jan 2006
Posts: 306
Location: Mass

PostPosted: Sat Jun 16, 2012 10:53 pm    Post subject: Reply with quote

Quote:
<speechles> !wz Bristol UK
<sp33chy> speechles's weather request; Bristol Airport, United Kingdom (51.4°N/2.7°W); Updated: 9:50 PM BST (June 16, 2012); Conditions: Mostly Cloudy; Temperature: 54°F (12.2°C); High/Low: 59/50°F (15/10°C); UV: 0/16; Humidity: 88%; Dew Point: 50°F (10°C); Pressure: 29.83 in/1010 hPa; Wind: WSW at 16 MPH (26 KPH)


Quote:
Are you using Incith:Weather 2.9a? This is the version I am using above. This is not the version found of the archive. This is a special egghelp forum edition for those brave enough to wander into this thread and find it. Enjoys Smile


Thanks very much, can't believe I missed that.
Back to top
View user's profile Send private message
blake
Master


Joined: 23 Feb 2009
Posts: 201

PostPosted: Sun Jul 29, 2012 10:23 am    Post subject: Reply with quote

Hey

In the set options line break \n turned on is it possible to only have that work for the !forecast bind and disable it with the weather bind also in the !forecast bind were could I add !tweet so it will tweet the forecast
_________________
Blake
UKEasyHosting UKStormWatch
Back to top
View user's profile Send private message Visit poster's website
trickle
Voice


Joined: 02 Jun 2012
Posts: 3

PostPosted: Fri Aug 03, 2012 8:43 am    Post subject: Search causing bot to flood out Reply with quote

Hi. Users in channels I am running the script on have been finding it entertaining to cause my bot to flood out from doing a search for the weather on Uranus. User does the search "!weather Uranus" and the bot starts flooding raw HTML into the channel until it is flooded off the network. Anyone know of a fix?
Back to top
View user's profile Send private message
speechles
Revered One


Joined: 26 Aug 2006
Posts: 1398
Location: emerald triangle, california (coastal redwoods)

PostPosted: Sun Aug 05, 2012 12:52 pm    Post subject: Re: Search causing bot to flood out Reply with quote

trickle wrote:
Hi. Users in channels I am running the script on have been finding it entertaining to cause my bot to flood out from doing a search for the weather on Uranus. User does the search "!weather Uranus" and the bot starts flooding raw HTML into the channel until it is flooded off the network. Anyone know of a fix?

Hmmm... That's a bummer. People will see that and amuse themselves by typing it over and over and having the bot flood the channel. Somebody should probably fix the issue to eliminate bad behavior. Well, looks like they just did.. Smile

Quote:
<speechles> !wz uranus
<sp33chy> speechles's weather request; Uranus, Antarctica (71.4°S/68.8°W); Updated: 8:00 PM EDT (August 05, 2012); Temperature: 6°F (-14.4°C); High/Low: 5/0°F (-15/-17.8°C); Wind: West at 13 MPH (22 KPH)


Code:
#  2.9b: Corrected cruft within updated time.                         #


Get it here: Incith:Weather 2.9b

Enjoys, have fun. Dance like an robot. ;D
_________________
speechles' eggdrop tcl archive
Back to top
View user's profile Send private message
gig
Voice


Joined: 31 Jul 2012
Posts: 3
Location: Texas

PostPosted: Sun Aug 05, 2012 7:45 pm    Post subject: Reply with quote

Can we get rid of the Celsius reporting for those of us in the US somehow?
Back to top
View user's profile Send private message
Mysticales
Voice


Joined: 18 Oct 2011
Posts: 26

PostPosted: Sun Sep 02, 2012 5:13 pm    Post subject: Reply with quote

gig wrote:
Can we get rid of the Celsius reporting for those of us in the US somehow?


I disagree. In IRC have people from all over the world. I actually like that I dont need to set F or C and instead have both results. Makes it easier for everyone.. since technically USA is the oddball for using F.
_________________
~Battlez-avec la Mystique?~
Back to top
View user's profile Send private message
MrBenC
Voice


Joined: 24 Nov 2012
Posts: 4

PostPosted: Tue Dec 04, 2012 1:46 pm    Post subject: Reply with quote

Note: Because of the post following this one, performing this fix is no longer necessary.

I apologize for my first post to start out this way, but I consider this to be of critical importance. To the point that if this fix is not implemented, you should not run this script.

So, I've discovered a HUGE problem with this script, in version 2.9b.

Reproducing the error is easy.

All one has to do, is type a command like the following:

!weather Canada

Or some other large, vague location with a very large number of towns and cities. As the script is designed to like multiple results, it will proceed to list each and every single town in Canada (or at least try), if you were to use my previous example.

This greatly increases the likelihood the bot will flood itself off of the network. Sure, users should just use the correct commands in the first place, but mistakes can be made, and as everyone knows, there's always people who, upon discovering exploits, will abuse them.


Fortunately, I discovered a way to fix it. Around line 878 or so, you will see the following lines of code:

Code:

        if {[llength [set lr [lsort -unique -increasing $lr]]] == 1} {
          unset output
          array set output [fetch_html "[lindex $lu 0]" "http://classic.wunderground.com" 1]
        } else {
          set output(error) "Multiple Results Found: [join $lr "; "]"
        }


Change it to the following code:

Code:

        if {[llength [set lr [lsort -unique -increasing $lr]]] == 1} {
          unset output
          array set output [fetch_html "[lindex $lu 0]" "http://classic.wunderground.com" 1]
        } else {
          #set output(error) "Multiple Results Found: [join $lr "; "]"
          if {[llength [set lr [lsort -unique -increasing $lr]]] <= 5} {
             set output(error) "Multiple Results Found: [join $lr "; "]"
          } else {
             set output(error) "More than five results found, please narrow your search!"
          }


Note that I changed it return an error if more than five results are found. You can change it to 10, or even 20. However, you must make sure there is an upper limit of some sort.

One you change the code, all you have to do is rehash the bot. To test if you implemented the fix correctly, type

!weather Springfield

on IRC. While it will ordinarily return over five results with a script without my fix, it doesn't produce a huge amount of text.


Unless this fix is implemented, I don't recommend running this otherwise very nice script. Allow me to repeat that:

Do not run this script until this fix is implemented!

Edit: I didn't expect such a quick fix. Thank you.
_________________
Ben


Last edited by MrBenC on Tue Dec 04, 2012 8:05 pm; edited 1 time in total
Back to top
View user's profile Send private message
speechles
Revered One


Joined: 26 Aug 2006
Posts: 1398
Location: emerald triangle, california (coastal redwoods)

PostPosted: Tue Dec 04, 2012 2:21 pm    Post subject: Reply with quote

Rather than get all crazy and make demands of other people, let me explain. This occured because wunderground has changed their markup when multiple results occur. No longer can you tell when the page has a ton of results appear. There used to be markup to indicate it was.

This isn't an emergency. You won't suffer a gunshot wound to the face. Nobody is outside your window waiting to "gut you like a fish". The thing is, most of you would have never noticed. So instead of making some huge deal about it with red text at the beginning and huge bold text at the end. I prefer to just get to the point... A new version... YAY!!

Code:
# what are the maximum amount of locations to show when multiples are given?
variable multiple_result 25


As usual, get the script at its regular location:
Incith:Weather 2.9c

Code:
<speechles> !weather canada
<sp33chy> 583 results found, listing first 25: Abbotsford, British Columbia; Acadia Valley, Alberta; Addenbroke Island, British Columbia; Agassiz, British Columbia; Aklavik, Northwest Territories; Akulivik, Quebec; Alert, Nunavut; Amherst, Nova Scotia; Argentia, Newfoundland; Armstrong, Ontario; Arviat, Nunavut; Assiniboia, Saskatchewan; Atikokan, Ontario; Atlee, Alberta; Aulavik National Park, Northwest
<sp33chy> Territories; Aupaluk, Quebec; Bachelors Island Marine, Manitoba; Bagotville, Quebec; Baie Comeau Airport, Quebec; Baie Comeau, Quebec; Baker Lake, Nunavut; Ballenas Island, British Columbia; Bancroft, Ontario; Banff Airport, Alberta; Banff, Alberta

<speechles> !weather india
<sp33chy> 137 results found, listing first 25: Agartala, India; Agra, India; Ahmedabad, India; Alibag, India; Allahabad, India; Amritsar, India; Anantapur, India; Ariyalur, India; Arrah, India; Atiramapattinam, India; Aurangabad, India; Azamgarh, India; Bagati, India; Bagdogra Airport, India; Balasore, India; Ballia, India; Bangalore Airport, India; Bangalore, India; Bankura, India; Bareilly, India; Belgaum,
[10:28am] <sp33chy> India; Bhira, India; Bhopal, India; Bhubaneswar, India; Bhuj, India

_________________
speechles' eggdrop tcl archive
Back to top
View user's profile Send private message
MrBenC
Voice


Joined: 24 Nov 2012
Posts: 4

PostPosted: Tue Dec 04, 2012 8:13 pm    Post subject: Reply with quote

Sorry for coming off as a bit strong in my last post. I have since edited it to reflect the very prompt reply I received.

Thank you very much for that, by the way. I appreciate it, and I'm sure others do as well.


I guess I figured that someone would eventually start abusing the (now non-existent) loophole. The reason I did what I did, was because I didn't discover this problem on my own. Someone else told me, and even flooded my bot off of the network. Therefore, I figured it would soon become public knowledge.

In retrospect, I probably should have used a PM.
_________________
Ben
Back to top
View user's profile Send private message
b0RG
Voice


Joined: 19 Jan 2013
Posts: 1

PostPosted: Sat Jan 19, 2013 6:23 pm    Post subject: Require msgcat.tcl 1.5 Reply with quote

Hi there speechles. Hope you are well and having a good new year this year!

We have upgraded all our servers to use TCL 8.5, but they have all updated using msgcat.tcl 1.5 rather than 1.4. Is it possible you could made it so this weather script works for 1.5 as well? We can't really go backwards with TCL so I thought I would ask.

So, thank you for your time and as well for this script. It's been used a lot by us. Smile
Back to top
View user's profile Send private message
FightingNavyman
Voice


Joined: 18 Jan 2011
Posts: 35

PostPosted: Fri Mar 08, 2013 11:09 pm    Post subject: Reply with quote

How do I make this script to show likethis:

http://pastebin.com/K2bP23r5

chicken is using mirc scripting and boobsbot is using incith-weather 2.9c
Back to top
View user's profile Send private message
arkadio
Voice


Joined: 13 Dec 2013
Posts: 6

PostPosted: Fri Dec 13, 2013 8:00 am    Post subject: Reply with quote

Hi there, Idk if you still maintaining this script but suddenly a few cities started to show strange:

[09:55] <+arkadio> !tempo erechim
[09:55] <Toma_Bebic> Erechim, Brazil; Atualizado: 22:00 BRST (December 12, 2013); Condições: </div></td></tr></table><table cellspacing="0" cellpadding="0" class="dataTable"><tbody><tr><td>Temperature:</td><td class="full b"><span class="pwsrt" pwsid="" pwsunit="both" pwsvariable="tempf" english="&deg;F" metric="&deg;C" value=""> -</span></td></tr><tr><td>Windchill:</td><td> -</td></tr><tr><td>Wind:</td><td
[09:56] <Toma_Bebic> class="full b"><span class="pwsrt" pwsid="" pwsunit="both" pwsvariable="windspeedmph" english="mph" metric="km/h">Calm</span><div id="condboxWindDiv"><img src="http://icons-ak.wxug.com/graphics/360arrows_blue.gif" alt="" id="condboxArrowDiv" />; Temperatura: 2.0°C (35.6°F); Sensação térmica: 4.0°C (2.0°F); Vento: Calm

[09:33] <Thyago> !tempo quirinopolis
[09:33] <+Toma_Bebic> Quirinopolis, Brazil; Atualizado: 22:00 BRST (December 12, 2013); Condições: </div></td></tr></table><table cellspacing="0" cellpadding="0" class="dataTable"><tbody><tr><td>Temperature:</td><td class="full b"><span class="pwsrt" pwsid="" pwsunit="both" pwsvariable="tempf" english="&deg;F" metric="&deg;C" value=""> -</span></td></tr><tr><td>Windchill:</td><td> -</td></tr><tr><td>Wind:</td><td
[09:33] <+Toma_Bebic> class="full b"><span class="pwsrt" pwsid="" pwsunit="both" pwsvariable="windspeedmph" english="mph" metric="km/h">Calm</span><div id="condboxWindDiv"><img src="http://icons-ak.wxug.com/graphics/360arrows_blue.gif" alt="" id="condboxArrowDiv" />; Temperatura: 6.0°C (42.8°F); Sensação térmica: 10.0°C (6.0°F); Vento: Calm
Back to top
View user's profile Send private message
play4free2
Voice


Joined: 23 Nov 2013
Posts: 33

PostPosted: Fri Dec 13, 2013 3:44 pm    Post subject: Reply with quote

arkadio

I run this same script on my bot, when I saw your post I checked the cities you tried and got the same result. I also checked the website "classic.wunderground.com" and for the cities you posted the website showed station not reporting. I just rechecked both and it's now working on the bot and I checked the website and it shows the weather instead of station not reporting.

Hope this helps
_________________

420-HIGHTIMES IRC Network
Back to top
View user's profile Send private message Visit poster's website
arkadio
Voice


Joined: 13 Dec 2013
Posts: 6

PostPosted: Fri Dec 13, 2013 10:48 pm    Post subject: Reply with quote

yes, crazy, working like a charm now.
Back to top
View user's profile Send private message
Display posts from previous:   
Post new topic   Reply to topic    egghelp.org community Forum Index -> Script Support & Releases All times are GMT - 4 Hours
Goto page Previous  1, 2, 3 ... 13, 14, 15 ... 19, 20, 21  Next
Page 14 of 21

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum


Forum hosting provided by Reverse.net

Powered by phpBB © 2001, 2005 phpBB Group
subGreen style by ktauber