mIRC Home    About    Download    Register    News    Help

Topic Options
#32886 - 29/06/03 07:31 AM socket errors
mooshasta Offline
Pikka bird

Registered: 23/06/03
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?

Top
#32887 - 29/06/03 12:13 PM Re: socket errors
Online Offline
Hoopy frood

Registered: 09/12/02
Posts: 1922
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".

Top
#32888 - 29/06/03 08:44 PM Re: socket errors
mooshasta Offline
Pikka bird

Registered: 23/06/03
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?

Top
#32889 - 29/06/03 08:47 PM Re: socket errors
pheonix Offline
Hoopy frood

Registered: 06/05/03
Posts: 2265
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

Top
#32890 - 29/06/03 08:49 PM Re: socket errors
mooshasta Offline
Pikka bird

Registered: 23/06/03
Posts: 13
Thank you! that works smile But why does it when the other one doesn't?

Top
#32891 - 29/06/03 09:05 PM Re: socket errors
pheonix Offline
Hoopy frood

Registered: 06/05/03
Posts: 2265
i think its because the other 1 had an error and it didnt return.
_________________________
new username: tidy_trax

Top