]>
jfr.im git - irc/pisg.git/blob - pisg/modules/Pisg/Parser/Format/eggdrop.pm
1 package Pisg
::Parser
::Format
::eggdrop
;
3 # Documentation for the Pisg::Parser::Format modules is found in Template.pm
10 my ($type, %args) = @_;
13 normalline
=> '^\[(\d+):\d+(?:\:\d+)?\] <([^>]+)> (.*)$',
14 actionline
=> '^\[(\d+):\d+(?:\:\d+)?\] Action: (\S+) (.*)$',
15 thirdline
=> '^\[(\d+):(\d+)(?:\:\d+)?\] (\S+) (\S+) (\S+) (\S+)(.*)$',
24 my ($self, $line, $lines) = @_;
27 if ($line =~ /$self->{normalline}/o) {
41 my ($self, $line, $lines) = @_;
44 if ($line =~ /$self->{actionline}/o) {
58 my ($self, $line, $lines) = @_;
61 if ($line =~ /$self->{thirdline}/o) {
67 if (($4.$5) eq 'kickedfrom') {
68 $7 =~ /^ by ([\S]+):\s*(.*)/;
70 $1 =~ /([^!]+)/; # Remove anything after the !
73 } elsif ($3 eq 'Topic') {
74 $7 =~ /^ by (\S*)!(\S+): (.*)/;
75 $hash{nick
} = $1 || $2; # $1 might be empty if topic is reset by server
78 } elsif (($4.$5) eq 'modechange') {
80 if ($7 =~ /^ (.+) by ([\S]+)!.*/) {
81 $hash{modechanges
} = $2;
84 $hash{newmode
} = $newmode;
87 } elsif ($5 eq 'joined') {
90 } elsif (($3.$4) eq 'Nickchange:') {
95 } elsif (($3.$4.$5) eq 'Lastmessagerepeated') {
99 $hash{nick
} =~ /([^!]+)/;