Skip to content

Instantly share code, notes, and snippets.

@kylef
Created June 23, 2011 14:10
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save kylef/1042604 to your computer and use it in GitHub Desktop.
Save kylef/1042604 to your computer and use it in GitHub Desktop.
InspIRCd stats from m_http_stats
#!/bin/sh
address="https://localhost:8081/stats"
count_type=$1
if [[ "$count_type" != "user" && "$count_type" != "channel" ]]; then
echo "Usage: $0 <user|channel>"
exit 1
elif
count=$(wget -q -Y off -O - --no-check-certificate $address | xml sel -t -v "inspircdstats/general/${count_type}count")
echo $count
echo $count
echo "IRC $count_type"
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment