Don't think it'd be too difficult but if you're wanting to do permanent restrictions for a variety of weapons and players then storing it in a file wouldn't be the method id suggest.
A database would be better suited for this as you're probably going to be storing a lot of entries. I could probably have a bash at this but I can't guarantee a finish date as I'm pretty busy this weekend and work full time during the week. Send me a PM if you don't mind how long it takes and we can discuss the details.