Originally Posted By: westor
I cannot really understand what you wanna do at this case, but you have to explain more about it, describe what you wanna do by steps and examples.

Dear westor, I apologize for not having explained above code. blush
Purpose: Join the channels through my IRC client, after having connected a ZNC, sometimes disconnects from the 40 channels that I am and get all reentry.
Where I run the alias: status window

I 'll explain the code:
Code:
/joinall {
echo -s Joining all channels.....
var %counter = 1

*** Run the alias and put the counter variable to 1.****

Code:
while (%counter <= $numtok(%recan,44)) {

*** I make a loop, while the counter variable is less than or equal to the number of tokens that contains the variable recan, in this variable are stored all channels that joined in my last session of IRC.*****


Code:
if ($comchan($me,%counter) == $gettok(%recan,%counter,44)) { .timer 1 $calc(%counter + 3) echo -s you already are in $comchan($me,%counter)
inc %counter
}

***I compare if I'm on the channel "n " and if that channel is contained in the variable that stores the channels. If I am in any of the channels, it shows me the status window text "you already are in #channel" ....***


Code:
else {
.timer 1 $calc(%counter + 3) .msg chan invite $gettok(%recan,%counter,44)
inc %counter


***To the contrary case ( "else" ) invited me to channel that I am not.***

This is where fault code for a bug in the network.
The network understands through its BoT Chan I have no permits and code or stops or continues to invite me to other channels in which I'm already inside.
For that reason , I tried to solve the problem , pointing to the code if you find that error continue with the loop.
So I used the on *:text:*Permission denied!*:?:{ continue } event, now that can not be used there.

How can you fix that ?

I hope you were able to understand my idea, my English is not good. blush