Advertisement
westor

MIRC $URLGET().SIZE BUG

Apr 10th, 2023 (edited)
2,812
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
mIRC 0.89 KB | None | 0 0
  1. alias test_one { noop $urlget(https://www.mirc.com/versions.txt,gfik,test.txt,test_one_cb) }
  2. alias test_one_cb {
  3.   echo 3 -ag state: $urlget($1).state
  4.   echo 3 -ag size: $urlget($1).size
  5.   echo 3 -ag reply: $urlget($1).reply
  6. }
  7.  
  8. ; --------
  9.  
  10. alias test_two {
  11.   sockclose test_two
  12.   sockopen -e test_two www.mirc.com 443
  13. }
  14.  
  15. ON *:SOCKOPEN:test_two: {
  16.   if ($sockerr) { echo 4 -a Socket opening error! -> $sockerr -> $sock($sockname).wsmsg | return }
  17.  
  18.   sockwrite -nt $sockname GET /versions.txt HTTP/1.1
  19.   sockwrite -nt $sockname Host: www.mirc.com
  20.   sockwrite -nt $sockname User-Agent: mIRC
  21.   sockwrite -nt $sockname $crlf
  22. }
  23.  
  24. ON *:SOCKREAD:test_two: {
  25.   if ($sockerr) { echo 4 -a Socket reading error! -> $sockerr -> $sock($sock).wsmsg | return }
  26.  
  27.   var %r
  28.   sockread %r
  29.  
  30.   if (!$sockbr) { return }
  31.  
  32.   if (%r == $null) { sockclose $sockname | return }
  33.  
  34.   echo 12 -ag headers: %r
  35. }
  36.  
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement