mIRC Home    About    Download    Register    News    Help

Print Thread
socket errors #32886 29/06/03 06:31 AM
Joined: Jun 2003
Posts: 13
M
mooshasta Offline OP
Pikka bird
OP Offline
Pikka bird
M
Joined: Jun 2003
Posts: 13
Code:
alias go {
  sockopen hiscores mail.patmedia.net 110
}


I am having problems connecting to a server. After i call go, the on 1:sockread event is called, but i cant call a sockread, it says the socket is unavailable. i used $sock(hiscores,1).swmsg and it said [0] Unknown Error.

Does anyone know what could be wrong?

Re: socket errors #32887 29/06/03 11:13 AM
Joined: Dec 2002
Posts: 1,922
O
Online Offline
Hoopy frood
Offline
Hoopy frood
O
Joined: Dec 2002
Posts: 1,922
This code works:
Code:
alias go sockopen hiscores mail.patmedia.net 110
On *:sockread:hiscores:{
  var %a
  sockread %a
  echo -s -> %a
}

Type /go, wait a moment, and you'll get "+OK POP3 patmedia.net v2001.78mdk server ready".

Re: socket errors #32888 29/06/03 07:44 PM
Joined: Jun 2003
Posts: 13
M
mooshasta Offline OP
Pikka bird
OP Offline
Pikka bird
M
Joined: Jun 2003
Posts: 13
That code doesn't work for me still frown I am getting a [0] Unknown Error again

I guess that I just can't work with sockets?

Re: socket errors #32889 29/06/03 07:47 PM
Joined: May 2003
Posts: 2,265
P
pheonix Offline
Hoopy frood
Offline
Hoopy frood
P
Joined: May 2003
Posts: 2,265
alias go { sockopen hiscores mail.patmedia.net 110 }
on 1:SOCKREAD:hiscores:{
if ($sockerr > 0) { return }
sockread %s
//echo -a >> %s
}


new username: tidy_trax
Re: socket errors #32890 29/06/03 07:49 PM
Joined: Jun 2003
Posts: 13
M
mooshasta Offline OP
Pikka bird
OP Offline
Pikka bird
M
Joined: Jun 2003
Posts: 13
Thank you! that works smile But why does it when the other one doesn't?

Re: socket errors #32891 29/06/03 08:05 PM
Joined: May 2003
Posts: 2,265
P
pheonix Offline
Hoopy frood
Offline
Hoopy frood
P
Joined: May 2003
Posts: 2,265
i think its because the other 1 had an error and it didnt return.


new username: tidy_trax