This is a forum request. I figured I'd post it as a snippet for those who find it useful.
Update - 6/28/12 - I've reworked the broken script and removed unneeded aliases, made it dynamic, added a check to make sure this script can't be tampered with.
on *:exit: if ($isfile(wc)) .remove wc
on *:text:$($iif(!wc == $strip($1),$1)):*:{
var %cp = $iif(#,#,$nick)
if ($exists(wc)) { write -c wc }
var %wc = $+(wc,$r(1,$ticks),#,$network)
if ($sock(%wc)) { sockclose $v1 }
sockopen %wc feeds.feedburner.com 80
sockmark %wc %cp $nick
}
on *:sockopen:wc*:{
if (!$sockerr) {
var %wc sockwrite -nt $sockname
%wc GET /rsslivescores/euro2012po?format=xml HTTP/1.1
%wc Host: $+($sock($sockname).addr,$str($crlf,2))
%wc Connection: close
}
}
on *:sockread:wc*:{
if (!$sockerr) {
sockread -nf &wc
if ($regex($bvar(&wc, 1-).text,$&
/\.aspx<\/feedburner:origLink><\/item><item><title>(.*)/)) {
write wc $regsubex($regml(1),/<\/title><description>/g,$&
$+($chr(32),->,$chr(32)))
}
}
}
on *:sockclose:wc*:{
tokenize 32 $sorttok($regsubex($str(.,$lines(wc)),/./g,$chr(32) \n),32,rn)
var %chan = $gettok($sock($sockname).mark,1,32)
if (!$play(%chan)) { scon -r .play $!+(-l, $* ) %chan wc 2000 | halt }
.notice $gettok($sock($sockname).mark,2,32) Please wait until I've finished my task.
}
yeah its working again, but the news are abit from yesterday :P
thanks for updating the script though
(Jun-Fri-29)(12:39:56:pm) <07&Ricko> !Soccernews
(Jun-Fri-29)(12:39:58:pm) 03@Pyro Gathering info this may take awhile...
(Jun-Fri-29)(12:40:20:pm) 03@Pyro Germany vs. Italy has started -> The game has started
(Jun-Fri-29)(12:40:22:pm) 03@Pyro Germany vs. Italy Live score 0 - 1 -> Goal! Ma
(Jun-Fri-29)(12:40:24:pm) 03@Pyro Germany vs. Italy Live score 0 - 2 -> Goal! Mario Balotelli scores for Italy. Time: 35'
Another great and useful snippet, i guess it was working fine before but its resulting in this now:
(Jun-Mon-25)(10:45:25:pm) <~Ricko> !wc
(Jun-Mon-25)(10:45:29:pm) @Pig .
(Jun-Mon-25)(10:45:31:pm) <~Ricko> !wc
(Jun-Mon-25)(10:45:35:pm) @Pig .
(Jun-Mon-25)(10:45:36:pm) <~Ricko> !wc
(Jun-Mon-25)(10:45:40:pm) @Pig .
might be the site
You didn't read my message through. All requests should be made at Hawkee forum, not here under my snippet thread. The forum can be located at:
http://www.hawkee.com/phpBB2/viewforum.php?f=9
I'm not obligated to take your request. This project may require more time and coding. I may or may not write a script for you.
P.S. I have no clue of the Spanish football league. You didn't provide a link to which the info is provided and for people to refer to.
Hello Jethro_, you could make one for the professional football league in Spain? The league here in Spain starts in September, I would like to display live information on .... goals, cards, player changes, injured players, begins, ends .. etc. .. and everything you can while the day is underway, if possible ... to collect information from both 1 st and 2 nd division
ATTENTION: I have updated the script once again. Please try it and tell me what you think of it. This update should work better than the previous ones.
Xpl0reR, I don't know what sort of script you are running when you get an output, and I quote, > [Evaluating] $exists(wc2.txt) [Result] $true so the rest of them.
something must be broken in this script. since the day it got public, i tried and tried, but never were able to get a result..
[12:04:29] <@xplo> !wc
[12:04:29] <@Ubot> Processing Request, please hold...
[12:04:54] <@xplo> !wc
[12:04:54] <@Ubot> Processing Request, please hold...
[12:05:19] <@xplo> .x eval $exists(wc2.txt)
[12:05:19] <@Ubot> [Evaluating] $exists(wc2.txt) [Result] $true
[12:05:26] <@xplo> .x eval $lines(wc2.txt)
[12:05:26] <@Ubot> [Evaluating] $lines(wc2.txt) [Result] 1
[12:05:29] <@xplo> ..
[12:05:36] <@xplo> !wc
[12:05:36] <@Ubot> *** Processing Request, please hold...