Plugin to receive file and approve it's tansfer if valid

i want to create a plugin for openfire in which admin can receive the incoming file and if the admin approves then only a file get transfer to assigned

recepient. i need this to filter out unwanted / abusive content.

can any one guide me how to do it ? i have little knowledge of plugin but i dont know how would i approve file recive and let it flow to the receipent