|
Joined: Feb 2020
Posts: 3
Self-satisified door
|
OP
Self-satisified door
Joined: Feb 2020
Posts: 3 |
Hi, how do I add, (~) owner, (&) admin and (%) halfop? raw 366:*:{
if ($me ison $2) {
echo $2 $smbt $asctime( $timestamp ) 0[7#0] 10Users9: 0(Total users: $+ $c(2) $nick($2,0,a) - Operators: $+ $c(2) $nick($2,0,o) $+ $borda($percent($nick($2,0,o),$nick($2,0,a))) - Voices: $+ $c(2) $nick($2,0,v) $+ $borda($percent($nick($2,0,v),$nick($2,0,a))) - Regular: $calc($nick($2,0,a) - ($nick($2,0,o) + $nick($2,0,v))) $+ )
}
halt
}
|
|
|
|
Joined: Jan 2004
Posts: 2,127
Hoopy frood
|
Hoopy frood
Joined: Jan 2004
Posts: 2,127 |
Where you count voices like $nick($2,0,v) you could also count them by the prefix symbol like $nick($2,0,+) You can do the same thing for other modes, using either the channel-mode or the nick-prefix. The exception is when the mode-letter has already been previously defined. For example, when protected-op is given mode +a, you can't use $nick($2,0,a) because that's already defined as 'all'. But if owner and protected-op have ~ and & you can use $nick($2,0,~) $nick($2,0,&) When doing this for halfop, if you use % instead of h, be sure the % isn't the 1st character of an alphanumeric string or it looks for a %variable instead.
|
|
|
|
Joined: Feb 2020
Posts: 3
Self-satisified door
|
OP
Self-satisified door
Joined: Feb 2020
Posts: 3 |
Where you count voices like $nick($2,0,v) you could also count them by the prefix symbol like $nick($2,0,+) You can do the same thing for other modes, using either the channel-mode or the nick-prefix. The exception is when the mode-letter has already been previously defined. For example, when protected-op is given mode +a, you can't use $nick($2,0,a) because that's already defined as 'all'. But if owner and protected-op have ~ and & you can use $nick($2,0,~) $nick($2,0,&) When doing this for halfop, if you use % instead of h, be sure the % isn't the 1st character of an alphanumeric string or it looks for a %variable instead. It worked, only when returning only normal users it returns all[01:53] [#] Usuários: (Total de usuários: 100 - Owner: 0 - Administradores: 2 - Operadores: 5 - Halfops: 1 - Voices: 2 - Normais: 100)
|
|
|
|
Joined: Jan 2004
Posts: 2,127
Hoopy frood
|
Hoopy frood
Joined: Jan 2004
Posts: 2,127 |
You didn't say what you did for normals. There is no mode for normal, because it's the absense of all modes. I was trying to say that $nick($chan,0,a) is 'all' because the 'a' switch for 'all' supercedes the +a mode given to protected-ops. If you want normals, you either use the 'r' flag as parm 3, or use 'a' (all) for parm 3 then have parm 4 be a list of all modes. //echo -ag $nick($chan,0,a,ohv&~) or $nick($chan,0,r)
The 4th parm is needed to have accurate results in situations where someone has several modes. In effect, parm4 needs to be a list of all modes except the mode listed in parm 3.
//mode $chan +ov $me $me avoids double counting by using $nick($chan,0,o,hv&~)
|
|
|
|
|