mIRC Homepage
Posted By: XGamerAMD on join problem - 19/12/22 12:46 AM
on 1:JOIN:#:{ meop $nick }

alias meop {
if $nick isop $chan { .echo -a not allowed }
}


thnx
Posted By: maroon Re: on join problem - 19/12/22 01:11 PM
Not clear what your goal is, but this will never be $true because nobody joining the channel is an @op during the ON JOIN event. Also, is this supposed to match yourself-only, or others-only, or match everyone?
Posted By: XGamerAMD Re: on join problem - 19/12/22 08:33 PM
Originally Posted by maroon
Not clear what your goal is, but this will never be $true because nobody joining the channel is an @op during the ON JOIN event. Also, is this supposed to match yourself-only, or others-only, or match everyone?

if my nick is an op do ......... and if not do ............
Posted By: maroon Re: on join problem - 20/12/22 08:56 AM
during ON JOIN, $nick is the nick joining the channel, and yourself is always $me, so you can do something like:

if ($me isop $chan) {
if my nick is an op do .........
}
else {
and if not do ............
}
Posted By: Simo Re: on join problem - 20/12/22 04:23 PM
since on join doesnt have a way yet to know if you are opped or not perhaps using this might be a better aproach:

Code

ON *:op:#:{
  if ($opnick == $me) {
    if ($istok(network1 network2,$network,32) && $istok(#channel1 #channel1,$channel,32)) {  you are opped on specific network and channel }  
    if ($istok(network1 network2,$network,32) && $istok(#channel1 #channel1,$channel,32)) {  you are opped on specific network and channel }  
  }
}

Posted By: Simo Re: on join problem - 20/12/22 04:33 PM
or you could add a delay in the on me event for mirc to determine if you are opped or not after it gets that info from server wich takes a moment to retreive from server

Code

ON ME:*:JOIN:#: { 
  .timer -m 1 500 checkopme $unsafe($chan)  
}


alias checkopme { 
  if ($nick($1,$me,@)) { im opped on $1 }  
  else { im not opped on $1 }  
}

Posted By: XGamerAMD Re: on join problem - 21/12/22 12:02 AM
Originally Posted by Simo
or you could add a delay in the on me event for mirc to determine if you are opped or not after it gets that info from server wich takes a moment to retreive from server

Code

ON ME:*:JOIN:#: { 
  .timer -m 1 500 checkopme $unsafe($chan)  
}


alias checkopme { 
  if ($nick($1,$me,@)) { im opped on $1 }  
  else { im not opped on $1 }  
}


thnx you simo
Posted By: Simo Re: on join problem - 21/12/22 05:17 AM
The first one should be
Code

ON *:op:#:{
  if ($opnick == $me) {
    if ($istok(network1 network2,$network,32) && $istok(#channel1 #channel1,$chan,32)) {  you are opped on specific network and channel }  
    if ($istok(network1 network2,$network,32) && $istok(#channel1 #channel1,$chan,32)) {  you are opped on specific network and channel }  
  }
}


© mIRC Discussion Forums