Ok genius, I did what you said and it's all working fine. There's a small thing that may become an issue sooner or later though. When the bot closes or disconnects, it saves the table to the INI file. On load it loads the INI, etc (as you already know).
But the thing is, it's loading the INI to the hash and the INI has over 10k lines which will probably soon be 20k, etc. The number of lines will just keep increasing and the time it takes to load the INI into the hash will take even longer.
My idea was on disconnect or exit, look at the current INI and use $lines to see how many lines it has. If it exceeds 10k lines, create a second INI and on load, it could just load all INI's. But I would need the script to know which INI was the last INI to be created so it could check that file to see if it exceeds the line limit which will determine whether or not it needs to create a new INI.
So if I named the INI's: userips1.ini, userips2.ini, userips3.ini, etc, how could I make the script know that 'userips3.ini' was the last file to be created?