Yes...Yes...It is another one =P
This snippet will pull a random tweet from twitters API for fun_tweets.
Warning: Some of the Fun Tweets do contain foul language. So use in a room where you will not get banned for the use of foul language.
Like always, do what ever you want with this snippet. I don't care.
Copy/Paste into a new remote of your Bot, or in your own mIRC client.
Trigger is @ftweet
Example:
@ftweet
<~Sick0> :[Fun Tweets]: @JPHaddadio Dinner guests coming over later and I got nothing. Does anyone know how to turn beef jerky back into steaks?
<~Sick0> @ftweet
<~Sick0> :[Fun Tweets]: @RonnieWK Mouth piercings look like robot herpes.
<~Sick0> @ftweet
<~Sick0> :[Fun Tweets]: @Paxochka I can't be the only person who hears the phone ringing and says "oh fuck, what NOW?" (http://funtweets.com)
@ftweet
<~Sick0> :[Fun Tweets]: @BillMc7 To be honest, I'm not going to be completely happy until Facebook implements a 'I Wish You Were Dead' button.
```mirc
alias -l ftweet {
if (!$($+(%,fut,#),2)) { inc -u4 $+(%,fut,#)
if ($sock($+(fut,#))) sockclose $+(fut,#)
sockopen $+(fut,#) api.twitter.com 80
sockmark $+(fut,#) $r(1,20)$&
$+(/1/statuses/user_timeline/fun_tweets.rss?page=,$&
$r(1,35)) msg # :[04Fun Tweets]:
}
}
on *:sockopen:fut*: {
sockwrite -nt $sockname GET $gettok($sock($sockname).mark,2,32) HTTP/1.1
sockwrite -nt $sockname Host: $+($sock($sockname).addr,$str($crlf,2))
}
on *:load:{
echo 07 -a You Have Just Loaded Napa182's Fun Tweets
echo 04 -a An Irc.EzzyChat.com Production
echo -a 08!!04WARNING08 This snippet may04/08will say curse04/08foul words 04WARNING08!!
}
on $*:text:/^@ftweet$/iS:#:ftweet
on *:input:#:if ($regex($1,/^@ftweet$/iS)) ftweet
on *:sockread:fut*: {
var %fut | sockread %fut
if ($regex(%fut,/fun.+\72\sRT\s(.+?)<\/title>/)) { inc -u4 %uf 1
if (%uf = $gettok($sock($sockname).mark,1,32)) {
$gettok($sock($sockname).mark,3-,32) $replace($regml(1),",",&,&)
sockclose $sockname
}
}
}
```