#!/bin/sh

if [ "$1" = "autoconf" ]; then
        echo "yes"
        exit 0
fi

if [ "$1" = "config" ]; then
    echo "graph_title service's database"
    echo "graph_info This graph shows the IRC service's database stats."
    echo "graph_category irc"
    echo "graph_order dbsize"
    echo "graph_scale yes"
    echo "graph_args --logarithmic -l 0.1"
    echo "dbsize.label DB size"
    echo "dbsize.draw LINE2"
    echo "memos.label Stored memos"
    echo "memos.draw LINE2"
    exit 0
fi

grep -i "dbsize.value" /tmp/irc/servicestats.txt
grep -i "memos.value" /tmp/irc/servicestats.txt

exit 0