Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP

Loading…

Implement dircproxy log file parsing #1

Closed
wants to merge 2 commits into from

2 participants

@ironchicken

This branch implements parsing the log files generated by dircproxy. I've created a subclass of Parse::IRCLog which implements the patterns sub defining msg and action patterns.

@rjbs
Owner

I've merged it and made some tweaks. I'd like to see tests for this, though.

@rjbs rjbs closed this
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
This page is out of date. Refresh to see the latest.
Showing with 16 additions and 0 deletions.
  1. +16 −0 lib/Parse/IRCLog/dircproxy.pm
View
16 lib/Parse/IRCLog/dircproxy.pm
@@ -0,0 +1,16 @@
+use strict;
+use warnings;
+
+use Parse::IRCLog;
+
+package Parse::IRCLog::dircproxy;
+our @ISA = qw(Parse::IRCLog);
+
+sub patterns {
+ return $_[0]{patterns} if ref $_[0] and defined $_[0]{patterns};
+
+ {msg => qr/^@([0-9]+)\s+<([+%@])?([^!]+)![^>]+>(\s)(.+)/,
+ action => qr/^@([0-9]+)\s+\[([+%@])?([^!]+)![^\]]+\]\sACTION\s(.+)/};
+}
+
+1;
Something went wrong with that request. Please try again.