mIRC Homepage
Posted By: CtrlAltDel need help with onjoin - 12/03/05 02:17 PM
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?
Posted By: Relinsquish Re: need help with onjoin - 12/03/05 03:12 PM
In that case the flaw would be occuring in your aliases, not in the on JOIN event.
Posted By: CtrlAltDel Re: need help with onjoin - 12/03/05 03:15 PM
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)
Posted By: shaked Re: need help with onjoin - 12/03/05 04:23 PM
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
Posted By: DaveC Re: need help with onjoin - 12/03/05 07:37 PM
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?
Posted By: CtrlAltDel Re: need help with onjoin - 12/03/05 07:40 PM
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 } 
}
 
Posted By: ProseC Re: need help with onjoin - 19/03/05 06:10 PM
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
Posted By: mIRCManiac Re: need help with onjoin - 19/03/05 06:16 PM
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 #
© mIRC Discussion Forums