Your code work only to exit (part) the channel where I execute the command.

I want to leave all channels that have u mode, for that reason I made the alias, to check the channels I meet, and then comparing whether any of them has the mode u.

How is the complete code to work?