Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- alias socks {
- sockopen Smogon www.smogon.com 80
- set %move $$1-
- }
- on *:sockopen:Smogon: {
- sockwrite -nt Smogon GET /forums/showpost.php?p=3290502&postcount=3 HTTP/1.0
- sockwrite -nt Smogon Host: www.smogon.com
- sockwrite -nt Smogon $crlf
- }
- on *:sockread:Smogon: {
- var %text
- sockread %text
- if (%found == 2) {
- unset %found
- unset %move
- echo -a 5[ $+ $time $+ ] <MoveBot> $nohtml(%text)
- sockclose Smogon
- }
- if (%found == 1) inc %found 1
- if (($+(*<b>,%move,$chr(58),*</b>*) iswm %text) || ($+(*<b>,%move,</b>,$chr(58),*) iswm %text)) {
- inc %found 1
- echo -a 5[ $+ $time $+ ] <MoveBot> $nohtml(%text)
- }
- }
- alias -l nohtml {
- var %x, %i = $regsub($1-,/(^[^<]*>|<[^>]*>|<[^>]*$)/g,$null,%x), %x = $remove(%x, )
- return %x
- }
Advertisement
Add Comment
Please, Sign In to add comment