Thanks. I just tried it but it also didn't work.

What I meant with the "AUTOJOIN Unknown command" is that it has appeared in the stautus window when I tried that script (and also your one). So it has something to do with that.

I'm using Mirc 6.16. It just reconnects to the channels (about 20+) too fast which causes the server to disconnect me for excessive flood. Also if that happens a few times after each other (mirc is set to rejoin), the server bans me. Ofcourse there's also the headaches of getting kicked from some channels cause the ops don't like seeing my nick join/disconnect 5-10 times in one go.

ATM I have disabled the "rejoin channels on disconnect" option until I an find a solution. Ofcourse having to manually rejoin channels atm is only possible if I'm in front of the screen, and it's tedious. However I don't get any excessive flood when doing it manually cause I wait a few seconds between joins (only a few secs between a line of about 8 channels each time)