mIRC Home    About    Download    Register    News    Help

Print Thread
/sockopen through a httpproxy #21513 29/04/03 03:01 PM
Joined: Apr 2003
Posts: 2
J
JaPeX Offline OP
Bowl of petunias
OP Offline
Bowl of petunias
J
Joined: Apr 2003
Posts: 2
Is it possible to get topic working?

Thanks,
Jakob

Re: /sockopen through a httpproxy #21514 30/04/03 03:01 AM
Joined: Dec 2002
Posts: 2,809
C
codemastr Offline
Hoopy frood
Offline
Hoopy frood
C
Joined: Dec 2002
Posts: 2,809
Should be, assuming you are familiar with the http proxy protocol.

Re: /sockopen through a httpproxy #21515 30/04/03 02:32 PM
Joined: Dec 2002
Posts: 24
M
MadKooky Offline
Ameglian cow
Offline
Ameglian cow
M
Joined: Dec 2002
Posts: 24
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
}
 

Re: /sockopen through a httpproxy #21516 30/04/03 03:19 PM
Joined: Apr 2003
Posts: 2
J
JaPeX Offline OP
Bowl of petunias
OP Offline
Bowl of petunias
J
Joined: Apr 2003
Posts: 2
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