on !twitter command it sets some variables to be referenced later and executes the sockopen twitter
change sockwrite -n $sockname GET /statuses/user_timeline/14189511.rss to the twitter rss feed you would like it to read from. (go to the http://www.twitter.com/user page you want to use and click on "rss feed" on the bottom of the right column to get the rss address)
what is happen, is it sends the rss feed to %twitter_temp, then looks in %twitter_temp and finds each eqrunner tag, then writes the line; removing the tags. and adding it to a twitter_desc.txt file. Line by line.
On sockclose reads the txt file and echos the first post ($read(twitter_Desc.txt, 1)) You can change that or add more lines to echo more.
let me know if there is a better way to accomplish this
for user submitted !twitter for anyone, check out my other script http://www.hawkee.com/snippet/7033/
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
;; twitter ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
on *:TEXT:!twitter:#: {
set %twitter_network $network
set %twitter_chan $chan
sockopen twitter www.twitter.com 80
}
on *:sockopen:twitter:{
set %twitter_name eqrunner
sockwrite -n $sockname GET /statuses/user_timeline/14189511.rss
sockwrite -n $sockname Host: www.twitter.com
sockwrite -n $sockname $crlf
}
on *:sockread:twitter: {
sockread %twitter_temp
if (<description> $+ %twitter_name isin %twitter_temp) {
set %twitter_Descline $remove(%twitter_temp,<description>,</description>)
write -i twitter_Desc.txt %twitter_Descline
}
}
on *:sockclose:twitter: {
msg %twitter_chan $read(twitter_Desc.txt, 1)
unset %twitter*
write -c twitter_Desc.txt
}