mIRC Home    About    Download    Register    News    Help

Print Thread
#78656 09/04/04 04:19 PM
Joined: Apr 2004
Posts: 2
I
Bowl of petunias
OP Offline
Bowl of petunias
I
Joined: Apr 2004
Posts: 2
Yo,
i want thinks like this:

on 1:JOIN:#Rivella,#dod.wars:/mode #rivella +v $nick ;/mode #dod.wars +v $nick ; /msg $nick hihi

its an example, but is it possible to use 2 commands with a ; or something?

Joined: Dec 2002
Posts: 2,962
S
Hoopy frood
Offline
Hoopy frood
S
Joined: Dec 2002
Posts: 2,962
Use braces '{ }':

on 1:JOIN:#Rivella,#dod.wars:{
mode #rivella +v $nick
mode #dod.wars +v $nick
msg $nick hihi
}


Spelling mistakes, grammatical errors, and stupid comments are intentional.
Joined: Feb 2004
Posts: 2,019
Hoopy frood
Offline
Hoopy frood
Joined: Feb 2004
Posts: 2,019
As starbucks said, u can use the braces { }.
Then you can, as he stated, just put ur commands each time on a new line.

You can however in this case, also use pipes, which some users might find 'uglier' but i think they are handy for when ur dealing with short commands.

So you could do:
Code:
on 1:JOIN:#Rivella,#dod.wars:{ mode #rivella +v $nick | mode #dod.wars +v $nick | msg $nick hihi } 
  

OR
Code:
 
on 1:JOIN:#Rivella,#dod.wars:{
mode #rivella +v $nick | mode #dod.wars +v $nick | msg $nick hihi 
} 
 

OR as starbucks showed
Code:
on 1:JOIN:#Rivella,#dod.wars:{
mode #rivella +v $nick
mode #dod.wars +v $nick
msg $nick hihi
} 
  

What scripting style u use, that is entirely up to you..feel free to chose whatever suits u smile

On a side note, you don't have to specify the target channel in this event, as it is saved in the '#' or '$chan' parameter, so you could do:
Code:
  
on @!*:JOIN:#Rivella,#dod.wars:{ mode # +v $nick | msg $nick hihi }


Note that the @ means that the script will only trigger if you are oped in the channel where the join occurs, and the ! means that the script will not trigger, when you are the person that joins.

Greetz

Last edited by FiberOPtics; 09/04/04 05:03 PM.

Gone.
Joined: Dec 2002
Posts: 145
G
Vogon poet
Offline
Vogon poet
G
Joined: Dec 2002
Posts: 145
Quote:
on @!*:JOIN:#Rivella,#dod.wars:{ mode # +v $nick | msg $nick hihi }


I don't believe that " ! " is required in this instance since you are not an operator when you join a channel.

gemeau50

Joined: Feb 2004
Posts: 2,019
Hoopy frood
Offline
Hoopy frood
Joined: Feb 2004
Posts: 2,019
Hi,

That is correct, and I was aware of that when making it, I just added it out of precaution + showing him that ! can be used instead of if ($nick != $me), even though in this case it can be seen as redundant.

Grtz


Gone.
Joined: Apr 2004
Posts: 2
I
Bowl of petunias
OP Offline
Bowl of petunias
I
Joined: Apr 2004
Posts: 2
Thanks, it works!


Link Copied to Clipboard