mIRC Homepage
Posted By: mooshasta socket errors - 29/06/03 06:31 AM
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?
Posted By: Online Re: socket errors - 29/06/03 11:13 AM
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".
Posted By: mooshasta Re: socket errors - 29/06/03 07:44 PM
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?
Posted By: pheonix Re: socket errors - 29/06/03 07:47 PM
alias go { sockopen hiscores mail.patmedia.net 110 }
on 1:SOCKREAD:hiscores:{
if ($sockerr > 0) { return }
sockread %s
//echo -a >> %s
}
Posted By: mooshasta Re: socket errors - 29/06/03 07:49 PM
Thank you! that works smile But why does it when the other one doesn't?
Posted By: pheonix Re: socket errors - 29/06/03 08:05 PM
i think its because the other 1 had an error and it didnt return.
© mIRC Discussion Forums