mIRC Home    About    Download    Register    News    Help

Print Thread
Prefix mode +a and -a #266883 27/02/20 10:05 PM
Joined: Jul 2014
Posts: 172
TECO Offline OP
Vogon poet
OP Offline
Vogon poet
Joined: Jul 2014
Posts: 172
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!


TECO
irc.PTirc.org (Co-Admin)
Re: Prefix mode +a and -a [Re: TECO] #266884 28/02/20 12:47 AM
Joined: Feb 2011
Posts: 343
K
KindOne Offline
Fjord artisan
Offline
Fjord artisan
K
Joined: Feb 2011
Posts: 343
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/


irc.swiftirc.net #msl (mIRC Scripting Language)
Re: Prefix mode +a and -a [Re: KindOne] #266885 28/02/20 01:20 AM
Joined: Jul 2014
Posts: 172
TECO Offline OP
Vogon poet
OP Offline
Vogon poet
Joined: Jul 2014
Posts: 172
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


TECO
irc.PTirc.org (Co-Admin)
Re: Prefix mode +a and -a [Re: TECO] #266886 28/02/20 01:43 AM
Joined: Jan 2004
Posts: 1,300
maroon Offline
Hoopy frood
Offline
Hoopy frood
Joined: Jan 2004
Posts: 1,300
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.

Re: Prefix mode +a and -a [Re: maroon] #266887 28/02/20 01:51 AM
Joined: Jul 2014
Posts: 172
TECO Offline OP
Vogon poet
OP Offline
Vogon poet
Joined: Jul 2014
Posts: 172
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.

Last edited by TECO; 28/02/20 01:51 AM.

TECO
irc.PTirc.org (Co-Admin)