chesslover89 wrote:Okay now i was wondering .......If i could have a blacklist of yahoo ID
so that all the guys in my blacklist automatically gets booted from my table as soon as they enter...anyone tried it yet?????
Yes it is possible. First, since all the information fed to the script gets lost when the script is killed or terminated, that list should be stored permanently somwhere. It can be store in database and use mysql to access it but goes beyond the scope of this forum. The most feasable solution is to store it let's say in a text file, just be aware that if the text file gets lost due to a virus or a forced reformat or whatever other reason then your list will be lost, so keep in mind to have a back up of this text file.
Now I am going to explain how I did it, but I wont paste the code here since that will be too easy.
a.- A the begining of the script check if autobootlist.txt( I am using this name in this example) exists in your local drive, if it does exist then make the script to read it and store all the values in an array(for example @autobootlist) and if it doesnt exist then make the script to create it.
b.- Create a new subrutine and add a command to launch it. When the program is running, feed to this subroutime the name you want to be added to your "black list". The validity if this username should be checkd so you dont add erroneous values, the subrutine will add this new value to the autobootlist.txt as well to the @autobootlist array.
c. In the tableentry subroutine, everytime a user enters the table you are hosting, have his name checked against @autobootlist and if there is a match then boot the user.
The possibilities are many, for instance, in my subrutine, if I feed it with a user name that was already there, this means that I am actually want to remove the user from the list(and from the text file).
I hope this idea helps.