a simple code for viewing the ops voice and bans of a channel
alias ops {
var %i , %a , %nick
.echo $i *Listing $active Oplist
%i = 1
:next
%nick = $nick($active,%i)
%a = $opnick($active,0)
if %a == 0 goto half
if %nick == $null goto done
if %nick isop $active .techo $i 14 $+ %nick 2is an Operator
inc %i
goto next
:half
.echo $i There are no Operators on $active
.techo $i End of $active Oplist
.halt
:done
.echo $i *Total Operators: $opnick($active,0)
.echo $i *End of $active Oplist
}
alias voicelist {
var %a = 1
.echo $i *Listing $active VoiceList
if ($vnick($active,0 < 1)) .techo $i *There are no Voiced nicknames on $active
else {
:one
.echo $i 14 $+ $vnick($active,%a) 2is Voiced
if (%a < $vnick($active,0)) { inc %a | goto one }
.echo $i *Total Voice: $vnick($active,0)
.echo $i *End of $active VoiceList
}
}
alias banlist {
var %d , %g , %f , %x
.echo $i *Listing $active Banlist
%d = 1
%g = 1
:next
%f = $banlist($active,%d) $banlist($active,%d).by $banlist($active,%d).date
%x = $banlist($active,0)
if %x == 0 goto half
if %f == $null goto end
.techo $i ( $+ $ord(%g) $+ ) Ban: $banlist($active,%d) From: $banlist($active,%d).by
inc %d
inc %g 1
goto next
:half
.echo $i $active *Banlist is empty
.echo $i *End of $active Banlist
.halt
:end
.echo $i *Total bans: $banlist($active,0)
.echo $i *End of $active Banlist
}
dialog cstats {
title "Channel Stats"
size -1 -1 137 49
option dbu
button "Ops List", 1, 5 7 37 12
button "Voice List", 2, 50 7 37 12
button "Ban List", 3, 95 7 37 12
button "Done!", 4, 30 28 81 12, flat ok
}
on *:dialog:cstats:sclick:*: {
if ($did == 1) { ops }
if ($did == 2) { voicelist }
if ($did == 3) { banlist }
}
menu channel {
-
Cstats: /dialog -m cstats cstats
}