Can you check connection status and allow/disallow a connection accordingly?

OK, I will explain that title! I am wondering if it’s possible to configure a node to parse the following conditions:

  1. User on node 12345 wants to connect to a specific node, say “54321”
  2. Allstar will only make the connection if 12345 is not connected to any other node.
  3. While connected to 54321, no other inbound connections are permitted.

Some announcements to go with the above states would be icing on the cake of course.

Thx. VE7NZ