Thanks for helping.
I tested your code but the result is this:
This is not the intended result. What I would like was something similar to what mIRC itself already does.
What I want is for the name of all networks and servers to which I am connected and the respective online nicknames of each network to appear in the same menu.