Recently I was trying to figure out who was most active on the IRC server I frequent. IRC by it’s very nature leaves log files so that you have a record of your conversations in your control. So you can perform some processing on them to determine various statistics. This is a one liner to compute that.
The log files are formatted like so:
DATE TIME USER/ServerMsg/Emote TheMsg
The awk portion is your standard sum up and print the totals script. It’s fed via a process substitution script to clean up any roles that each user has. The roles are prefixed on to the usernames, and people can be promoted at anytime or demoted or even mod up only when needed. It’s really quite cool how IRC lets mods speak outside of their admin role. The final step is to sort numerically.
I hope you found these details useful on cleaning up IRC logs.