/Chanlisting {
/*
Useage: Type /ChanListing [Echo/Msg] [Op/half/Voice/Reg]
You can use any combo of the above.
Examples: /chanlisting echo op voice reg
/chanlisting msg half reg voice
*/
var %Ops
var %Hops
var %voice
Var %reg
var %Nick 0
while (%nick <= $nick($chan,0)) {
inc %nick
if ($nick($chan,%nick) isop $chan) {
inc %ops
}
elseif ($nick($chan,%nick) ishop $chan) {
inc %hops
}
elseif ($nick($chan,%nick) isvoice $chan) {
inc %voice
}
elseif ($nick($chan,%nick) isreg $chan) {
inc %reg
}
}
if (!%ops) {
var %Total.ops 4I did not see any Operators on this channel.
}
elseif (%ops > 0) {
var %Total.ops 4There are: %ops Operators located on $chan $+ .
}
if (!%hops) {
var %Total.hops 7I did not find any Half-Operators on this channel.
}
elseif (%hops > 0) {
var %Total.hops 7There are: %hops Half-Operators located on $chan $+ .
}
if (!%voice) {
var %Total.voice 12I did not find any Voice users on this channel.
}
elseif (%voice > 0) {
var %Total.voice 12There are: %voice Voice users on $Chan $+ .
}
if (!%reg) {
var %Total.reg 3I did not find any Regular users on $chan $+ .
}
elseif (%reg > 0) {
var %Total.reg 3There are: %reg Regular users on $chan $+ .
}
if ($1 == Echo) {
//echo -a 11[Channel Listing $chan $+ ]
if (op isin $2-) {
//echo -a 4Listing Operators on $chan
//echo -a 4 $+ %Total.Ops
}
if (Half isin $2-) {
//echo -a 7Listing Half-Operators on $chan
//echo -a 7 $+ %Total.hops
}
if (voice isin $2-) {
//echo -a 12Listing Voice users on this channel.
//echo -a 12 $+ %Total.Voice
}
if (reg isin $2-) {
/echo -a 3Listing Regular users on this channel.
/echo -a 3 $+ %Total.reg
}
/echo -a 11[/Channel Listing $chan $+ ]
}
elseif ($1 == Msg) {
msg $chan 11[Channel Listing $chan $+ ]
if (op isin $2-) {
msg $chan 4Listing Operators on $chan
msg $chan 4 $+ %Total.Ops
}
if (Half isin $2-) {
//say 7Listing Half-Operators on $chan
//say 7 $+ %Total.hops
}
if (voice isin $2-) {
//say 12Listing Voice users on this channel.
//say 12 $+ %Total.Voice
}
if (reg isin $2-) {
//say 3Listing Regular users on this channel.
//say 3 $+ %Total.reg
}
msg $chan 11[/Channel Listing $chan $+ ]
}
}