Hi guys,
I was wondering if it was possible to add multiple commands to an alias?
For Instance, in my alias panel.
/cow /join #cow /join #cow2 /join #cow3
All on the same line. Obviously this is incorrect and it will only take my first variable. Anyway around it?
alias with multiple line must use { }, and you must seperate command with a | (space seperated) or with a new line
/cow { join #cow | join #cow2 }
or
/cow {
join #cow
join #cow2
etc
}
Note that you can join several channel with only one /join command, it's recommended since it only sends one command to the server (type /help /join in mIRC).
Chances are your chat server may support multiple targets:
/cow /join #cow,#cow2,#cow3
Thanks Guy!!! Lots of help and much appreciated.
Further question though is it possible to set a small DELAY on a remote command?
on CLOWN1:TEXT:*clean*:#:{
.timer 1 5 msg $chan WINDOWS <-- I would like this to have a small delay
}
on CLOWN2:TEXT:*clean*:#:{
.timer 1 5 msg $chan WINDOWS <-- I would like this to have a small delay
}
on CLOWN3:TEXT:*clean*:#:{
.timer 1 5 msg $chan WINDOWS <-- I would like this to have a small delay
}
Is this correct?
Did you try it?
Also, it looks like you have 3 events doing the exact same thing... why not just have one single user level?
Assuming you have various user levels doing the same command, you can use an if statement and $ulevel identifier to do it in three ways:
on *:TEXT:*clean*:#:{
if ($ulevel == clown1) || ($ulevel == clown2) || ($ulevel == clown3) {
...
on *:TEXT:*clean*:#:{
if ($istok(clown1 clown2 clown3,$ulevel,32)) {
...
on *:TEXT:*clean*:#:{
if ($regex($ulevel,/^clown[1-3]$/i)) {
...
Note that the regex example doesn't count unless you really have the same user level with 1, 2, 3...etc attached at the end.