home *** CD-ROM | disk | FTP | other *** search
- { SAMPLE PIL SCRIPT [COUNT]
- Usage /runscript [COUNT]
- Counts the people in the channel, seperating ops and
- undernet bots }
- ops := 0;
- bots := 0;
- usercount := strtoint($members);
- for i := 1 to usercount do
- begin
- $s := nicklist($audience,i);
- if $s = 'X' then
- bots := bots + 1;
- if $s = 'W' then
- bots := bots + 1;
- if isop($audience,$s) then
- ops := ops + 1;
- end;
- if bots = 1 then
- $s2 := ' is a service bot';
- if bots <> 1 then
- $s2 := ' are service bots';
- ops := ops - bots;
- if usercount > 0 then
- percentage := ops * 100 / usercount
- else
- percentage := 0;
- command('/msg ',$audience,' There are ',$members, ' members of ',$audience,' (',ops,' are ops and ',bots,$s2,') ',
- percentage,'% of ',$audience,' is occupied by ops');
-