I don't disagree with the above, but in case you want to do it anyway: You could create a plugin at hook location mod_index_navigation and create a "ban ip" option for the modcp nav menu (to see how to do that, look at modcp/index.php, the code before the mod_index_navigation hook). Then you could take the ip banning code from admincp/options.php and copy it to a new php file in modcp. The admincp has the option info in the database, but in the modcp you'll have to use the print_form_header(), print_table_header(), etc functions to create your form. I think including global.php from modcp instead of admincp (which will happen just by puitting the file in modcp) will take care of checking for moderating permission instead of admin permission, but I'm not sure - you might have to add some permission checking if you don't want all mods to be able to ban ips.
I know that's all pretty general, but if you want to get this done I don't think there's any choice other than to spend some time to understand how the modcp code works.
|