3
I have never run into a situation where I needed to create new blocks on that frequent of a basis. However for the not-so-faint of heart, take a look at
/modules/system/admin/blocksadmin/blocksadmin.php in the function save_block. In particular, those running XOOPS 2.0.5 take a look at lines 212-217