mIRC Home    About    Download    Register    News    Help

Print Thread
#34834 08/07/03 12:12 AM
Joined: Jun 2003
Posts: 10
D
Pikka bird
OP Offline
Pikka bird
D
Joined: Jun 2003
Posts: 10
I want a user to be able to request a hidden host on my bot once every 14 days. How would i check that? The date they LAST requested is stored in $readini(vhost.ini,<Nick>,ldate) using $date. How would i compare that to the current $date to see if it was 14 or more days ago?

#34835 08/07/03 12:24 AM
Joined: May 2003
Posts: 730
S
Hoopy frood
Offline
Hoopy frood
S
Joined: May 2003
Posts: 730
if ($calc($ctime($date) - $readini(vhost.ini,<Nick>,ldate)) >= 1209600) { do something }

#34836 08/07/03 12:27 AM
Joined: Jun 2003
Posts: 10
D
Pikka bird
OP Offline
Pikka bird
D
Joined: Jun 2003
Posts: 10
How did you get 1209600?

#34837 08/07/03 01:08 AM
Joined: Feb 2003
Posts: 143
N
Vogon poet
Offline
Vogon poet
N
Joined: Feb 2003
Posts: 143
He did this.

$calc(60*60*24*14)

that returns how many seconds are in 14 days because $duration is calculated in seconds.


We don't just write the scripts, we put them to the test! (ScriptBusters)

Link Copied to Clipboard