In this case, %room is evaluated two times: in the return command, and in the set command itself that was returned.
This would work:
Code:
elseif ($2 == deleteroom) { return %room : set $eval(% $+ rooms,0) $remtok(%rooms,%room,0,32) }


Also note that the actual channel names will be evaluated as well. That's no problem as long as you know which room names you put and they aren't like #$somechan
You may use an alias (like in the previous code) to bypass the evaluation thingie in the command part at least.

Edit: If you want to play really safe about all evaluations, use the safe alias and:
Code:
    elseif ($2 == deleteroom) { return $safe($replace(%room,&,&&)) : set $safe(% $+ rooms $remtok(%rooms,%room,0,32)) }
smile

Last edited by Horstl; 16/02/09 10:27 PM.