J-Script — File Browser

J-Scriptv2.2 / J-Scriptv2.2 / ini / listnicks.mrc

listnicks.mrc — 4.46 KB — Download this file

menu channel {
  -
  List ALL Nicks:{
    set %nicklist.tcount [ $nick(#,0) ] | set %nicklist.rcount [ $rnick(#,0) ] | set %nicklist.ocount [ $opnick(#,0) ] | set %nicklist.vcount [ $vnick(#,0) ] | set %nicklist.hcount [ $hnick(#,0) ]
    if ( %nicklist.rcount == $null ) { echo $colour(highlight) -at Problem with rcount | /halt }
    elseif ( %nicklist.ocount == $null ) { echo $colour(highlight) -at Problem with ocount | /halt }
    elseif ( %nicklist.vcount == $null ) { echo $colour(highlight) -at Problem with vcount | /halt }
    elseif ( %nicklist.hcount == $null ) { echo $colour(highlight) -at Problem with hcount | /halt }
    window -a @ChanOPs | aline @ChanOPs 4Total number of users in # is12 %nicklist.tcount 4Total non-OPed users is12 %nicklist.rcount $+ .4 OP/Chatter Ratio:12 $calc( %nicklist.ocount / %nicklist.ocount ) $+ : $+ $calc(%nicklist.rcount / %nicklist.ocount ) 4Percentage of network chatters in this room:12 $calc( [ %nicklist.tcount / %gusers ] * 100) $+ $chr(37)
    msg # 4Total number of users in # is12 %nicklist.tcount 4Total non-OPed users is12 %nicklist.rcount $+ .4 OP/Chatter Ratio:12 $calc( %nicklist.ocount / %nicklist.ocount ) $+ : $+ $calc(%nicklist.rcount / %nicklist.ocount ) 4Percentage of network chatters in this room:12 $calc( [ %nicklist.tcount / %gusers ] * 100) $+ $chr(37)

    :ostart
    if ( %nicklist.ocount == 0 ) goto rstart
    set %nicklist.ohere 1 | set %nicklist.ox 1 | set %nicklist.oy 1 | [ % $+ [ nicklist.olist $+ [ %nicklist.ox ] ] ] = ""
    echo $colour(highlight) -at Current ops ( $+ %nicklist.ocount $+ ) in $chan are:

    :onicks
    [ % $+ [ nicklist.olist $+ [ %nicklist.ox ] ] ] = [ % $+ [ nicklist.olist $+ [ %nicklist.ox ] ] ] $opnick(#,%nicklist.ohere)
    if %nicklist.ohere == %nicklist.ocount goto ops
    inc %nicklist.ohere
    if $len( [ % $+ [ nicklist.olist $+ [ %nicklist.ox ] ] ] ) >= 900 { inc %nicklist.ox }
    goto onicks

    :ops
    echo 1 -at [ % $+ [ nicklist.olist $+ [ %nicklist.oy ] ] ]
    if %nicklist.oy == %nicklist.ox goto rstart
    inc %nicklist.oy
    goto ops

    :rstart
    if ( %nicklist.rcount == 0 ) goto vstart
    set %nicklist.rhere 1 | set %nicklist.rx 1 | set %nicklist.ry 1 | [ % $+ [ nicklist.rlist $+ [ %nicklist.rx ] ] ] = ""
    echo $colour(highlight) -at Current channel members ( $+ %nicklist.rcount $+ ) in $chan are:

    :rnicks
    [ % $+ [ nicklist.rlist $+ [ %nicklist.rx ] ] ] = [ % $+ [ nicklist.rlist $+ [ %nicklist.rx ] ] ] $rnick(#,%nicklist.rhere)
    if %nicklist.rhere == %nicklist.rcount goto reg
    inc %nicklist.rhere
    if $len( [ % $+ [ nicklist.rlist $+ [ %nicklist.rx ] ] ] ) >= 900 { inc %nicklist.rx }
    goto rnicks

    :reg
    echo 1 -at [ % $+ [ nicklist.rlist $+ [ %nicklist.ry ] ] ]
    if %nicklist.ry == %nicklist.rx goto vstart
    inc %nicklist.ry
    goto reg

    :vstart
    if ( %nicklist.vcount == 0 ) goto hstart
    set %nicklist.vhere 1 | set %nicklist.vx 1 | set %nicklist.vy 1 | [ % $+ [ nicklist.vlist $+ [ %nicklist.vx ] ] ] = ""
    echo $colour(highlight) -at Voiced channel members ( $+ %nicklist.vcount $+ ) in $chan are:

    :vnicks
    [ % $+ [ nicklist.vlist $+ [ %nicklist.vx ] ] ] = [ % $+ [ nicklist.vlist $+ [ %nicklist.vx ] ] ] $vnick(#,%nicklist.vhere)
    if %nicklist.vhere == %nicklist.vcount goto voice
    inc %nicklist.vhere
    if $len( [ % $+ [ nicklist.vlist $+ [ %nicklist.vx ] ] ] ) >= 900 { inc %nicklist.vx }
    goto vnicks

    :voice
    echo 1-at [ % $+ [ nicklist.vlist $+ [ %nicklist.vy ] ] ]
    if %nicklist.vy == %nicklist.vx goto hstart
    inc %nicklist.vy
    goto voice

    :hstart
    if ( %nicklist.hcount == 0 ) goto end
    set %nicklist.hhere 1 | set %nicklist.hx 1 | set %nicklist.hy 1 | [ % $+ [ nicklist.hlist $+ [ %nicklist.hx ] ] ] = ""
    echo $colour(highlight) -at Channel helpers ( $+ %nicklist.hcount $+ ) in $chan are:

    :hnicks
    [ % $+ [ nicklist.hlist $+ [ %nicklist.hx ] ] ] = [ % $+ [ nicklist.hlist $+ [ %nicklist.hx ] ] ] $vnick(#,%nicklist.hhere)
    if %nicklist.hhere == %nicklist.hcount goto helper
    inc %nicklist.hhere
    if $len( [ % $+ [ nicklist.hlist $+ [ %nicklist.hx ] ] ] ) >= 900 { inc %nicklist.hx }
    goto hnicks

    :helper
    echo 1-at [ % $+ [ nicklist.hlist $+ [ %nicklist.hy ] ] ]
    if %nicklist.hy == %nicklist.hx goto end
    inc %nicklist.hy
    goto helper

    :end
    echo $colour(notice) -at ********** END OF LISTING **********
    /unset %nicklist.*
    /halt
  }
}