mIRC Homepage
Posted By: JaPeX /sockopen through a httpproxy - 29/04/03 03:01 PM
Is it possible to get topic working?

Thanks,
Jakob
Posted By: codemastr Re: /sockopen through a httpproxy - 30/04/03 03:01 AM
Should be, assuming you are familiar with the http proxy protocol.
Posted By: MadKooky Re: /sockopen through a httpproxy - 30/04/03 02:32 PM
Code:
 
    sockopen proxy <httpproxy> <port>

on *:sockopen:proxy: {
  if ($sock($sockname).status == active) {
    sockwrite -tn $sockname CONNECT <ircserver>:<port> HTTP/1.0
    sockwrite -tn $sockname $lf
  }
}

on *:sockread:proxy: {
  if ($sockerr > 0) return
  :sockread
  sockread %read
  if ($sockbr == 0) return
  if (%read) {
    if (($gettok(%read,2,32) == 200) || ($gettok(%read,2,32) == 504)) {
        sockwrite -n $sockname NICK <nick>
   sockwrite -n $sockname USER ...
}
    if ($gettok(%read,1,32) == PING) {   
       sockwrite -n $sockname PONG : $+ $gettok(%read,2,58)
    }
  }
  goto sockread
}
 
Posted By: JaPeX Re: /sockopen through a httpproxy - 30/04/03 03:19 PM
Thanks for the example!! It made me realize i had no problem at all .... i was just being completely daft!!

Thank you ever so much,
Jakob
© mIRC Discussion Forums