1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71
|
# STAT version 1.0 03 November 1993
#
# Shows additional statistics on server's current role on the net.
#
# Concept, original version: Twilight1 <pda@engr.engr.uark.edu>
# This version: Jeremy Nelson (nelson@cs.uwp.edu)
#
# Usage: /stat [server]
#
# Action: /stat by itself will query the statistics from the local server.
# /stat with an optional server name will query the remote server for
# the statistics.
alias stat {if ([$0]) {rstat $0} {lstat}}
alias lstat {
start_stat
^on ^255 * {
@ lstat.tmp = FLOATING_POINT_MATH
set floating_point_math ON
@ remote_users = [$3]
@ percent = (remote_users / total_users) * 100
@ average = total_users / total_servers
set floating_point_math $lstat.tmp
echo *** User statistics for server $0
echo *** I have $remote_users of $total_users users on $total_servers servers.
end_stat
}
lusers
}
alias rstat {
start_stat
lusers
wait
^on ^251 * { @remote_users = [$3]+[$6] }
^on ^255 * {
@ lstat.tmp = FLOATING_POINT_MATH
set floating_point_math ON
@ percent = (remote_users / total_users) * 100
@ average = total_users / total_servers
set floating_point_math $lstat.tmp
echo *** User statistics for server $0
echo *** I have $local_users of $total_users users on $total_servers servers.
end_stat
}
lusers $remote_server
}
alias start_stat {
stack push on 251
stack push on 252
stack push on 254
stack push on 255
^on ^251 * {@total_users = [$3]+[$6];@total_servers = [$9]}
^on ^252 * #
^on ^254 * #
^on ^255 * #
}
alias end_stat {
stack pop on 251
stack pop on 252
stack pop on 254
stack pop on 255
echo *** That is $percent% of the total number of users on IRC.
echo *** The average serverload is $average user[s] per server.
}
# Set phasers to stun.
|