Of course, I know how to add remote hosts manually. I am interested in editing the global script, which is responsible for generating the database and creating the user - so as to add a remote host at this level and block the possibility of its removal by the user.
In such case you must create databases manually, and disable GRANT for this user.
For automatical database creation you can use:
user_create_post.sh or domain_change_post.sh located in: /usr/local/directadmin/scripts/custom/
Maybe I still don't understand how it works in the user_create_post script? Do you have any examples that illustrate the situation when a user creates a database and a user and you automatically add him additional rights or a host? I want the script to download data given in the panel such as name, user, password. I am only interested in adding the external IP address and blocking it from being removed from the panel.
panel works with da_admin (mysql root) privileges, so user always can change db-user attributes.
In such case you must create database or via console without user access to modify db-user attributes, or you can create another directadmin account and create all limited databases via regular MysqlManagement, add hosts, disable GRANT, and give credentials to user.
user_create_post.sh - it's a regular shell (bash) script which runs on every user creation.