on *:text:!horoscope *:* { inc -u5 %m 1 if (%m > 3) { notice $nick flood detected.please wait 4 seconds before using !horoscope again } else { if ($istok(Aquarius.Pisces.Aries.Taurus.Gemini.Cancer.Leo.Virgo.Libra.Scorpio.Sagittarius.Capricorn,$2,46)) { sockopen horo www.daily-horoscopes.com 80 set %horo $2 set %channi $chan } else { msg $chan I dont know what is the 4 $2 Horoscope | notice $nick Horoscope usage: !horoscope } } } on *:sockopen:horo: { if (!$sockerr) { sockwrite -n horo GET / $+ %horo $+ .php HTTP/1.0 sockwrite horo $crlf } } on *:sockread:horo: { var %tmp if (%xa) { sockread %tmp | msg %channi 8,12 %horo $+ : 0 $+ %tmp sockclose horo | unset %xa | unset %channi | unset %horo halt } .sockread %tmp if ( isin %tmp) { set %xa 1 } }