Computing Most Chatty People in IRC
2022 May 03

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.

awk '{s[$3] += 1} END {for (v in s) print s[v], v }' <(cat $logfiles | tr -d '@+%&~_[') | sort -rn

I hope you found these details useful on cleaning up IRC logs.

Remember you can also subscribe using RSS at the top of the page!

Share this on → Mastodon Twitter LinkedIn Reddit

A selected list of related posts that you might enjoy:

Written by Henry J Schmale on 2022 May 03
Hit Counter