[edit: removed the lock suggestion]
It would be something like these..
Code:
[color:brown]on *:join:#:{ if ($nick == $me) && ($istok(%chans,$chan,32)) { part } }[/color]
or
[color:brown]on me:*:join:#:{ if ($istok(%chans,$chan,32)) { part } }[/color]

You'd fill %chans with "#channel1 #channel2 #channel3 ... #channelN".

Your current script fails because..
1) Your /if statement doesn't check if $chan is an existing item from the list on %chans. Instead, it checks if $chan is different (!=) than the whole list on %chans, which doesn't make sense;
2) Your /part command is not part of the /if statement (no { } brackets nor both sentences in the same line), causing the script to always leave any channel you join.

Last edited by cold; 22/09/03 05:50 AM.

* cold edits his posts 24/7