Advertisement
Charmander

socket..v_v

Apr 3rd, 2013
102
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
mIRC 0.64 KB | None | 0 0
  1. on *:text:*:#: {
  2.   if (*http://*smogon.com/forums/showthread.php?* iswm $1-) {
  3.     sockopen Smogon www.smogon.com 80
  4.     set %thread $chr(47) $+ $gettok($wildtok($1-,http://*smogon.com/forums/showthread.php?*,1,32),3-,47)
  5.     set %chan #
  6.   }
  7. }
  8. on *:sockopen:Smogon: {
  9.   sockwrite -nt Smogon GET %thread HTTP/1.0
  10.   sockwrite -nt Smogon Host: www.smogon.com
  11.   sockwrite -nt Smogon $crlf
  12. }
  13. on *:sockread:Smogon: {
  14.   var %text
  15.   sockread %text
  16.   inc %found
  17.   if (%found == 19) {
  18.     if (%text) msg %chan Thread: $mid(%text,32,$calc($len(%text) -61))
  19.     else msg %chan Invalid or private thread.
  20.     sockclose Smogon
  21.     unset %found
  22.   }
  23. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement