mIRC Home    About    Download    Register    News    Help

Print Thread
Joined: Dec 2014
Posts: 24
J
Jokke Offline OP
Ameglian cow
OP Offline
Ameglian cow
J
Joined: Dec 2014
Posts: 24
Hi!

I've got some trouble with the following code;
Code:
alias tilbud {
  sockclose gmr
  sockopen gmr www.playgames.dk 80
}

menu channel {
  DagsTilbud
  .Start: .timerAnnounce $+ #gamerhuset 0 1800 tilbud
  .Stop: .timerAnnounce $+ #gamerhuset 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 #gamerhuset Kig forbi vores sponsors dagstilbud! %data
}


the code works, sometimes. when I start the script, it's like 12 hours later the script actually runs for the first time. I've got help from this forum before to get this script to work, and I've done nothing towards this script on my own.

Joined: Dec 2014
Posts: 24
J
Jokke Offline OP
Ameglian cow
OP Offline
Ameglian cow
J
Joined: Dec 2014
Posts: 24
Bump,


anyone who is able to help me with this?

Joined: Sep 2014
Posts: 259
S
Fjord artisan
Offline
Fjord artisan
S
Joined: Sep 2014
Posts: 259
This is the page source of that link
Code:
http://www.playgames.dk/weekendtilbud.php


And this is the IF statement

Code:
if (html isin %data) { .... }


See the problem? wink

Joined: Dec 2014
Posts: 24
J
Jokke Offline OP
Ameglian cow
OP Offline
Ameglian cow
J
Joined: Dec 2014
Posts: 24
Yeah, I see what you mean, but the file it reads from is from the playtimes.txt wich is pure text.

The link in pure text shouldn't be the problem, or will it?

Joined: Sep 2014
Posts: 259
S
Fjord artisan
Offline
Fjord artisan
S
Joined: Sep 2014
Posts: 259
The problem is the link inside the link ended in .html before, but now it's .php

so just make this change, for example

if (playgames isin %data) { ... }


Link Copied to Clipboard