I like to get the same function as Hostnames and addresses, a binding of a mac-address to a specific ip-address.
What's against just using the panel?
That all should work in a script, is it possible to make a dhcp reservation with a db command or other commands ?
Yes, you will have to look at the source of the hostname panel to see how reservations are committed to the database and affected using the events.
You will also have some help on this, in general when trying to grasp what is being done how and why, by reading SME Server Development Guide linked from the wiki.
From the top off my head I think you need to alter/add to the hosts database and run an event like host-create, host-delete or host-modify.
Perhaps the lazy admin toolkit can be off help as well as a lot off adding users can be done batch wise, perhaps you can find some code snippets in there you can tweak and (re)use.