I'd like to help you, really, but with the information you've given that won't be easy, and I don't like wasting time trying to figure out what exactly will be the best solution for you, when the given information is vague.

Quote:
i have 3 ini file si store data in


Why do you have 3 ini files, is there any particular reason that you don't put all your data in one ini file? While I'm at it, why an .ini file to begin with? Are you going to have to do a lot of checking these files, because that means continuous disk access, so a solution where your data is held in memory would be much prefered.

Quote:
when someone types !check they will be msg'd the 5 most recent results


What's the definition of recent here? How would I, he who does not know what you are trying to do, know what recent is and what is not. I would imagine that "recent" data is the last added data? Though isn't the last added data always in the 3rd .ini file?

What are results? Results of doing what...? you obviously want to check "something" in the ini file, but failed to explain what exactly should happen. Are you trying to match a topic, an item, an item's value? How is the matching to be done, is it with wildcards? What is a regular example of the parameters when typing !check <parameters>? How's your data structured, how are the .ini files set up?

A prerequisite for receiving help is doing the effort of clearly explaining any information that might be important to know.

All I can give you is an equally vague little template:

var %results = 0, %ini = <first ini>
while (%results < 5) {
; "match" $1- in whatever way you want in %ini, incrementing %results for each "match"
; if at end of ini, set %ini to second file,
; when at end of third ini, break out of the while loop even if %results< 5
}

That's just about all I can give you given the vagueness of your query...


Gone.