Code:
new auth = get_user_authid(id)
format(holder, charsmax(holder), "%s", auth)
new configdir[200]
get_configsdir(configdir,199)
new configfile1[200]
format(configfile1,199,"%s/timer.ini",configdir)
new text[512], len
new pnum = file_size(configfile1,1)
for(new i = 1; i < pnum; i++)
{
read_file(configfile1, i, text, 511, len)
if ( contain(text, holder) != -1 )
{
//here is the problem, explained below
}
}
so in that ini file i have some authids and for each one an expiration date in format m%dd%dy%d, something like:
"authid" "pass" "flags" expiration date: m12d25y2011 ...
How can i read that part of the line that holds the date?
something like this:
if ( contain(text, "m%dd%dy%d") != -1 ){ // is this wrong also ?
new day = ?
new month = ?
new year = ?
client_print(id, print_chat, "your access expires on %d.%d.%d", day, month, year)
}