pony

horo new working on

Feb 16th, 2020
295
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.61 KB | None | 0 0
  1. #horo on
  2. on *:text:!horoscope*:#: {
  3. if ($group(#horoscope).status == off) { msg $chan Please wait a few moments. }
  4. if ($group(#horoscope).status == on) {
  5. if ($istok(Aquarius.Pisces.Aries.Taurus.Gemini.Cancer.Leo.Virgo.Libra.Scorpio.Sagittarius.Capricorn,$2,46)) {
  6. set %horosign $lower($2) | set %horochan $chan
  7. sockopen -e horoscope www.astrology.com 443
  8. .enable #horoscope
  9. }
  10. if (!$2 || !$istok(Aquarius.Pisces.Aries.Taurus.Gemini.Cancer.Leo.Virgo.Libra.Scorpio.Sagittarius.Capricorn,$2,46)) {
  11. msg $chan Horoscope usage: !Horoscope <sign>
  12. msg $chan Options: Aquarius Pisces Aries Taurus Gemini Cancer Leo Virgo Libra Scorpio Sagittarius Capricorn
  13. }
  14. }
  15. }
  16. #horoscope on
  17. on *:sockopen:horoscope: {
  18. sockwrite -nt $sockname GET $+(/horoscope/daily/,%horosign,.html) HTTP/1.1
  19. sockwrite -nt $sockname Host: www.astrology.com
  20. sockwrite -nt $sockname Connection: close
  21. sockwrite -n $sockname $crlf
  22. }
  23. on *:sockread:horoscope: {
  24. sockread %horotemp
  25. if (%horotemp) .echo -a >> $v1
  26. if ("page-horoscope-text" isin %horotemp) {
  27. var %horoscope $regex(horoscope,%horotemp,/(<div class="page-horoscope-text">)(.*)(</div>)/g)
  28. if (%horoscope == 1) set %horooverview $regml(horoscope,2)
  29. }
  30. }
  31. on *:sockclose:horoscope: {
  32. msg %horochan [Style ff:Comic Sans MS;co:#FF0000;b;]Horoscope for $upper($left(%horosign,1)) $+ $right(%horosign,-1) for $asctime(mmm dd yyyy) [/style]
  33. msg %horochan Daily: %horooverview
  34. msg %horochan [Style ff:Comic Sans MS;co:#FF0000;b;] Credits To Tewl / Pony [/style]
  35. unset %horo*
  36. .disable #horoscope
  37. }
  38. #horoscope end
  39. #horo end
Advertisement
Add Comment
Please, Sign In to add comment