I'm trying to get IRC to open/create, read, write, and close documents for information. I have been able to get IRC to manually do this by me typing in the commands in the main window, however, I'm trying to create a script that will do all this for me. I'm new to creating a database, so I'm trying to create something very basic while I pick up on how to make a databse.

The basis for what I'm trying to do is create administration logs for a gaming server's admin channel. When a player joins the server, his username, IP, hostname, and other information is displayed in the admin channel. I want a script that will read the username given and open or create (if file doesn't already exsist) a file with the username as the file name. The script will then paste the guys information along with the date and time he joined the server and then proceed to close the file. This process is repeated for every user and if the user already exsist, the newest line will appear on top and just keep pushing the older ones down.

I know all the commands and statements for the most part to get the above to work, but as soon as I create and mrc file with the program, it fails to work, as if IRC can't use the open, write, and close commands. Any reason if won't work?

Thanks a lot for your help.