mIRC Homepage
Posted By: TECO Prefix mode +a and -a - 27/02/20 10:05 PM
Can someone tell me what is the name of this prefix? I've tried "admin", "+a" and "protect" but none worked.
Code
on *:admin:#:{
  if ($nick == $me) { inc %stat.admin }
}
on *:deadmin:#:{
  if ($nick == $me) { inc %stat.deadmin }
}

Thank you!
Posted By: KindOne Re: Prefix mode +a and -a - 28/02/20 12:47 AM
No prefix exists for that. You will need to use On RAWMODE to catch that event.

Maybe something like this would work? http://hawkee.com/snippet/525/
Posted By: TECO Re: Prefix mode +a and -a - 28/02/20 01:20 AM
Originally Posted by KindOne
No prefix exists for that. You will need to use On RAWMODE to catch that event.

Maybe something like this would work? http://hawkee.com/snippet/525/

Thanks for your help. I ended up finding this solution.
Code
on ^*:rawmode:#:{
  if ($nick == $me) && (a isincs $1) {
    if ($1 == +a) { inc %stat.admin }
    elseif ($1 == -a) { inc %stat.deadmin }
  }

Is this solution correct? At least it works wink
Posted By: maroon Re: Prefix mode +a and -a - 28/02/20 01:43 AM
My experience is that this wouldn't work. Chanserv would give & and @ status at the same time like +ao nick nick, and it would be even more convoluted during the rejoin after a netsplit.
Posted By: TECO Re: Prefix mode +a and -a - 28/02/20 01:51 AM
Originally Posted by maroon
My experience is that this wouldn't work. Chanserv would give & and @ status at the same time like +ao nick nick, and it would be even more convoluted during the rejoin after a netsplit.

But this code will only be used to count the nicknames to whom I give the +a mode or remove it. In case of a netsplit, if I am not the nick, applying the modes will not affect me.
© mIRC Discussion Forums