Objection

New socks

Jan 7th, 2013
152
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
mIRC 1.04 KB | None | 0 0
  1. alias socks {
  2.   sockopen Smogon www.smogon.com 80
  3.   set %move $$1-
  4. }
  5. alias abortsocks {
  6.   sockclose Smogon
  7. }
  8. on *:sockopen:Smogon: {
  9.   sockwrite -nt Smogon GET /forums/showpost.php?p=3710694&postcount=3 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.   if (($+(*<b>,%move,$chr(58),*</b>*) iswm %text) || ($+(*<b>,%move,</b>,$chr(58),*) iswm %text)) {
  17.     if (%found != 1) {
  18.       set %found 1
  19.     }
  20.   }
  21.   else if (($+(*<b>,*,$chr(58),*</b>*) iswm %text) || ($+(*<b>,*,</b>,$chr(58),*) iswm %text) || *style=* iswm %text) && (%found == 1) {
  22.     unset %found
  23.     unset %move
  24.     sockclose Smogon
  25.   }
  26.   if (%found == 1 && $nohtml(%text) != $null) {
  27.     echo -a 5[ $+ $time $+ ] <CharScript> $nohtml(%text)
  28.   }
  29. }
  30. alias -l nohtml {
  31.   var %x, %i = $regsub($1-,/(^[^<]*>|<[^>]*>|<[^>]*$)/g,$null,%x), %x = $remove(%x,&nbsp;)
  32.   return %x
  33. }
  34. on *:sockclose:Smogon: {
  35.   echo -a 5[ $+ $time $+ ] <CharScript> Could not find data for that move.
  36. }
Advertisement
Add Comment
Please, Sign In to add comment