sockread stops halfway - 07/12/06 04:11 PM
Hi. I have been struggling with this script for a couple of days now, and i need some help.
What it does is that it will get todays tv-shows from tvrage.com and send it to #mychan, on the command !tv. The problem is that it stops reading halfway. I found out that it always stops after 1460 bytes. Can't mirc read more that 1460 bytes?
Here is the script:
Hope someone can give me an answer
Thanx
/cryptonic
What it does is that it will get todays tv-shows from tvrage.com and send it to #mychan, on the command !tv. The problem is that it stops reading halfway. I found out that it always stops after 1460 bytes. Can't mirc read more that 1460 bytes?
Here is the script:
Code:
on *:text:!tv:#mychan: { sockopen tvragetonight www.tvrage.com 80 } on *:sockopen:tvragetonight: { sockwrite -n $sockname GET /quickschedule.php HTTP/1.1 sockwrite -n $sockname Host: www.tvrage.com sockwrite -n $sockname $crlf } on *:sockread:tvragetonight: { while ($sockerr == 0) { sockread -f %readdata if ($sockbr == 0) { sockclose $sockname } if ([DAY] isin %readdata) { if (%nextday == 1) { sockclose $sockname | halt } var %nextday 1 msg #mychan NEW TV for $remove(%readdata,[DAY],[/DAY]) $+ (Time is GMT+1) } if ([time] isin %readdata) { if (%time != $null) { msg #mychan %time } var %temp $left($remove(%readdata,[TIME],[/TIME]),-3) var %time 0 $+ $calc($gettok(%temp,1,58) + 6 - 12) $+ : $+ $gettok(%temp,2,58) $+ : } if ([show] isin %readdata) { if (??:??: iswm $strip(%time)) { var %time %time $gettok($remove(%readdata,[SHOW],[/SHOW]),2,94) } else { var %time %time 9- $gettok($remove(%readdata,[SHOW],[/SHOW]),2,94) } } } }
Hope someone can give me an answer
Thanx
/cryptonic