Valiant effort. You did what I told you to, I should have explained better. You can't use $sockname in an alias event, as there is no sockname. But you don't need to either.
You can also not trigger /sockread in the alias event, but you need to wait for the on sockread event to occur after the sockopen event.
Take a look at the code I provide here.
alias tilbud {
sockclose gmr
echo Dagstilbud startet.
sockopen gmr www.playgames.dk 80
}
menu channel {
DagsTilbud
.Start: .timerAnnounce. $+ $chan 0 10 tilbud
.Stop: .timerAnnounce. $+ $chan off
}
on *:SockOpen:gmr: {
sockwrite -n $sockname GET /playtime.txt HTTP/1.1
sockwrite -n $sockname Host: www.playgames.dk
sockwrite -n $sockname
}
on *:sockread:gmr: {
var %data
sockread -f %data
if (html isin %data) msg #jokkebaby Kig forbi vores sponsors dagstilbud! %data
}