3 # Copyright 2011 by Jan Vales <jan@jvales.net> (Someone <someone@somenet.org>)
5 # This program is free software: you can redistribute it and/or modify
6 # it under the terms of the GNU General Public License as published by
7 # the Free Software Foundation, version 3 of the License.
9 # This program is distributed in the hope that it will be useful,
10 # but WITHOUT ANY WARRANTY; without even the implied warranty of
11 # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
12 # GNU General Public License for more details.
14 # You should have received a copy of the GNU General Public License
15 # along with this program. If not, see <http://www.gnu.org/licenses/>.
21 if [ "$1" = "autoconf" ]; then
26 if [ "$1" = "config" ]; then
27 echo "graph_title An IRC-Net comparison"
28 echo "graph_info This graph compares IRC Networks"
29 echo "graph_category irc"
30 echo "graph_printf %.0lf"
32 echo "graph_args -l 0"
34 for net in $NETIDLIST; do
35 echo "channels_${net}.label ${net}:channels"
36 echo "channels_${net}.draw LINE2"
37 echo "users_${net}.label ${net}:clients"
38 echo "users_${net}.draw LINE2"
39 echo "servers_${net}.label ${net}:servers"
40 echo "servers_${net}.draw LINE2"
45 for net in $NETIDLIST; do
46 grep -i "There are" /tmp/irc_${net}/lusers.txt 2>/dev/null | sed -E 's~^There are .*? on ([0-9]+) servers.*$~servers_'${net}'.value \1~'
47 grep -i "Current Global Users" /tmp/irc_${net}/lusers.txt 2>/dev/null | sed -E 's~^Current Global Users: ([0-9]+) .*$~users_'${net}'.value \1~'
48 grep -i "channels" /tmp/irc_${net}/lusers.txt 2>/dev/null | sed -E 's~^([0-9]+).*$~channels_'${net}'.value \1~'