I trying to lern $gettok, i grab the line i want to edit with:
$gettok($readini(system\aj\autojoin.ini,%tmp.nwork,channel),0,44)
Thats no problem, how ever if i want to remove the channel #test from the ini file -> [testar1]
Do i need to first grab the info with $gettok, then remove the channel from the line, and last write it back to the ini file again? must be a bether way to do this? someone that care to explain?
Added echo since i use the info in a dialog.
/set %tmp.nwork testar1
alias testar {
var %lx = $gettok($readini(system\aj\autojoin.ini,%tmp.nwork,channel),0,44)
var %xl = 1
while (%lx >= %xl) {
echo -a $gettok($readini(system\aj\autojoin.ini,%tmp.nwork,channel),%xl,44)
inc %xl
}
}
In the ini file.
[testar]
channel=#testar
[testar1]
channel=#testar1,#test,#test2
[testar2]
channel=#testar2