mIRC Home    About    Download    Register    News    Help

Print Thread
#114126 12/03/05 02:17 PM
Joined: Jun 2003
Posts: 994
C
Hoopy frood
OP Offline
Hoopy frood
C
Joined: Jun 2003
Posts: 994
Need help (or explanation) for this please.

Code:
on me:*:JOIN:#: {
  if ($chan == #channel1) { run an alias }  [color:red]alias works from command line [/color] 
  if ($chan == #channel2) { run another alias } [color:red] also works from command line [/color] 
  if ($chan == #channel3) { mode # +isnt }  [color:red] this works [/color] 
}
 


This will not trigger the aliases when I join, but it will set the mode of the third channel. Why? Is is my code, or something with mIRC?


I refuse to engage in a battle of wits with an unarmed person. wink
#114127 12/03/05 03:12 PM
Joined: Mar 2004
Posts: 175
Vogon poet
Offline
Vogon poet
Joined: Mar 2004
Posts: 175
In that case the flaw would be occuring in your aliases, not in the on JOIN event.


- Relinsquish
#114128 12/03/05 03:15 PM
Joined: Jun 2003
Posts: 994
C
Hoopy frood
OP Offline
Hoopy frood
C
Joined: Jun 2003
Posts: 994
one alias is a /msg to an individual (that works from the command line) and the other has worked from every other remote command I've used it in (plus the command line)


I refuse to engage in a battle of wits with an unarmed person. wink
#114129 12/03/05 04:23 PM
Joined: Mar 2005
Posts: 14
S
Pikka bird
Offline
Pikka bird
S
Joined: Mar 2005
Posts: 14
on me:*:JOIN:#: {
if ($chan == #channel1) { channel1 }
if ($chan == #channel2) { channel2 }
if ($chan == #channel3) { mode # +isnt }
}
alias channel1 {
echo -t joined #channel1!
}
alias channel2 {
echo -t joined #channel2!
}


Works for me! if it doesn't please send the exact alias you use

#114130 12/03/05 07:37 PM
Joined: Sep 2003
Posts: 4,230
D
Hoopy frood
Offline
Hoopy frood
D
Joined: Sep 2003
Posts: 4,230
Without the actual code its a bit hard to see if it might be something like a typo.

So i would do this

Code:
on me:*:JOIN:#: {
  if ($chan == #channel1) { echo -st JOIN EVENT $CHAN ... run an alias }
  if ($chan == #channel2) { echo -st JOIN EVENT $CHAN ... run another alias }
  if ($chan == #channel3) { mode # +isnt }
}


Then you can monitor if the alias is even being called and if it is exactly whats being passed as parameters.


oh PS : i would also do this (although its not related to your problem)
Code:
on me:*:JOIN:#: {
  if ($chan == #channel1)     { echo -st JOIN EVENT $CHAN ... run an alias }
  elseif ($chan == #channel2) { echo -st JOIN EVENT $CHAN ... run another alias }
  elseif ($chan == #channel3) { mode # +isnt }
}


[edit]
silly question, your not putting the word /RUN aliasname are you?

Last edited by DaveC; 12/03/05 07:38 PM.
#114131 12/03/05 07:40 PM
Joined: Jun 2003
Posts: 994
C
Hoopy frood
OP Offline
Hoopy frood
C
Joined: Jun 2003
Posts: 994
Problem solved: needed a timer
Code:
on me:*:JOIN:#: {
  if ($chan == #channel1) { .timer 1 30 run an alias }  
  if ($chan == #channel2) { .timer 1 30 run another alias } 
  if ($chan == #channel3) { mode # +isnt } 
}
 


I refuse to engage in a battle of wits with an unarmed person. wink
#114132 19/03/05 06:10 PM
Joined: Mar 2005
Posts: 1
P
Mostly harmless
Offline
Mostly harmless
P
Joined: Mar 2005
Posts: 1
About "on join", can anyone tell me an aliase that sends automaticaly a message to the users when entering a specified channel?I would appreciate some help smile

#114133 19/03/05 06:16 PM
Joined: Feb 2005
Posts: 681
M
Fjord artisan
Offline
Fjord artisan
M
Joined: Feb 2005
Posts: 681
1 specific channel
on !*:JOIN:#channel:msg $nick Hello $nick $+ ! Welcome to #

Multiple specific channels
on !*:JOIN:#channel1,#channel2,#channel3:msg $nick Hello $nick $+ ! Welcome to #

Last edited by mIRCManiac; 19/03/05 06:18 PM.

Link Copied to Clipboard