From 37c32eef282ca1273f283269e5bfcb70dfbfb360 Mon Sep 17 00:00:00 2001 From: Jan Vales Date: Mon, 18 Jan 2016 20:17:19 +0100 Subject: [PATCH] Updated ircd scripts to fix some channel naming fails. --- ircdch_ | 6 +++--- ircdlusers_ | 9 +++++---- 2 files changed, 8 insertions(+), 7 deletions(-) diff --git a/ircdch_ b/ircdch_ index 3beeb6b..ec0b13c 100755 --- a/ircdch_ +++ b/ircdch_ @@ -1,6 +1,6 @@ #!/bin/sh # -# Copyright 2011 by Jan Vales (Someone ) +# Copyright 2011-2016 by Jan Vales (Someone ) # # This program is free software: you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by @@ -29,10 +29,10 @@ if [ "$1" = "config" ]; then echo "graph_category irc" echo "graph_printf %.0lf" echo "graph_scale no" - cat "/tmp/irc_${IRCNET}/channels.txt" | grep "#" | sed -E -e 's~#~~g' -e 's~[^a-zA-Z0-9 ]~_~g' | sort -u | sort -k 2nr | awk '{print $1".label "$1"\n"$1".draw LINE2" }' | head -n 40 + grep "#" "/tmp/irc_${IRCNET}/channels.txt" | sed -E -e 's~^#~~' -e 's~[^a-zA-Z0-9 ]~_~g' | sort -u | sort -k 2nr | awk '{print "H"tolower($1)".label "$1"\nH"tolower($1)".draw LINE2" }' | head -n 40 exit 0 fi -cat "/tmp/irc_${IRCNET}/channels.txt" | grep "#" | sed -E -e 's~#~~g' -e 's~[^a-zA-Z0-9 ]~_~g' | sort -u | sort -k 2nr | awk '{print $1".value "$2 }' | head -n 20 +grep "#" "/tmp/irc_${IRCNET}/channels.txt" | sed -E -e 's~^#~~' -e 's~[^a-zA-Z0-9 ]~_~g' | sort -u | sort -k 2nr | awk '{print "H"tolower($1)".value "$2 }' | head -n 20 exit 0 diff --git a/ircdlusers_ b/ircdlusers_ index 9054e87..a896118 100755 --- a/ircdlusers_ +++ b/ircdlusers_ @@ -1,6 +1,6 @@ #!/bin/sh # -# Copyright 2011 by Jan Vales (Someone ) +# Copyright 2011-2016 by Jan Vales (Someone ) # # This program is free software: you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by @@ -39,7 +39,8 @@ if [ "$1" = "config" ]; then exit 0 fi -cat "/tmp/irc_${IRCNET}/lusers.txt" | grep 'channels formed' | sed -e 's/\(.*\) channels formed/channels.value \1/' -cat "/tmp/irc_${IRCNET}/lusers.txt" | grep -i 'Current Global Users' | sed -Ee 's/^.*[Cc]urrent [Gg]lobal [Uu]sers:? ([0-9]+).*[Mm]ax.*$/clients.value \1/' -cat "/tmp/irc_${IRCNET}/lusers.txt" | grep 'There are ' | sed -e 's/^.*on \(.*\) servers/servers.value \1/' +grep 'channels formed' "/tmp/irc_${IRCNET}/lusers.txt" | sed -e 's/\(.*\) channels formed/channels.value \1/' +grep -i 'Current Global Users' "/tmp/irc_${IRCNET}/lusers.txt" | sed -Ee 's/^.*[Cc]urrent [Gg]lobal [Uu]sers:? ([0-9]+).*[Mm]ax.*$/clients.value \1/' +grep 'There are ' "/tmp/irc_${IRCNET}/lusers.txt" | sed -e 's/^.*on \(.*\) servers/servers.value \1/' + exit 0 -- 2.43.0