I don't know if a bot also triggers client connect.
If so you could use add bot command and use on client connected to get it's index.
With a check if his name contains bot ofcourse so you dont get problems when a client connects at same time.
__________________
No longer taking requests due to lack of time and interrest.
Only helping out with minor things through forum.