mIRC Home    About    Download    Register    News    Help

Print Thread
#271152 19/12/22 12:46 AM
Joined: Apr 2005
Posts: 100
X
Vogon poet
OP Online
Vogon poet
X
Joined: Apr 2005
Posts: 100
on 1:JOIN:#:{ meop $nick }

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


thnx

Joined: Jan 2004
Posts: 2,002
Hoopy frood
Offline
Hoopy frood
Joined: Jan 2004
Posts: 2,002
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?

maroon #271155 19/12/22 08:33 PM
Joined: Apr 2005
Posts: 100
X
Vogon poet
OP Online
Vogon poet
X
Joined: Apr 2005
Posts: 100
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 ............

Joined: Jan 2004
Posts: 2,002
Hoopy frood
Offline
Hoopy frood
Joined: Jan 2004
Posts: 2,002
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 ............
}

Joined: Nov 2021
Posts: 61
Babel fish
Offline
Babel fish
Joined: Nov 2021
Posts: 61
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 }  
  }
}


Joined: Nov 2021
Posts: 61
Babel fish
Offline
Babel fish
Joined: Nov 2021
Posts: 61
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 }  
}


Last edited by Simo; 20/12/22 09:17 PM.
Simo #271162 21/12/22 12:02 AM
Joined: Apr 2005
Posts: 100
X
Vogon poet
OP Online
Vogon poet
X
Joined: Apr 2005
Posts: 100
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

Simo #271163 21/12/22 05:17 AM
Joined: Nov 2021
Posts: 61
Babel fish
Offline
Babel fish
Joined: Nov 2021
Posts: 61
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 }  
  }
}




Link Copied to Clipboard