Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- on *:SOCKOPEN:*: {
- if ($sockname == Lyrics) {
- sockwrite -nt $sockname GET /quotes.json HTTP/1.1
- sockwrite -nt $sockname Host: got-quotes.herokuapp.com
- sockwrite -nt $sockname User-Agent: Mozilla/4.0
- sockwrite -nt $sockname Connection: Close
- sockwrite $sockname $crlf
- }
- }
- on *:SOCKREAD:GOT: {
- var %x
- sockread %x
- echo -at > %x
- }
- ON *:SOCKCLOSE:GOT: {
- var %x
- while ($sockbr) {
- var %y
- sockread -f %y
- echo -at >>> %y
- }
- sockread %x
- echo -at >> %x
- }
- ON *:TEXT:!GOT: {
- sockopen -e GOT got-quotes.herokuapp.com 443
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement