OK, I couldnt edit the last post but I redid the code to add only 1 command to the server
I didnt use the $str(blah,$v1) because I dont know what $v1 does (and didnt care to find out right now)
alias chanduper {
;;variables
var %cd.chan = $?="What channel do you want to copy?"
var %cd.numchan = $?="How many copies?"
var %cd.op = $?!="Deop in all of the channels?"
;;while loop
while (%cd.numchan) {
var %cd.chan = $instok(%cd.chan,,2,46)
var %cd.chan = $remove(%cd.chan,.)
var %cd.join = $addtok(%cd.join,%cd.chan,44)
if (%cd.op) { mode %cd.chan -o $me }
dec %cd.numchan
}
join %cd.join
}
It works, but I get error messages equal to the number of copies I wanted to make. The error says:
$chan No such channel
(the channels are still joined though...)