]>
jfr.im git - irc/pisg.git/blob - pisg/modules/Pisg/Parser/Format/konversation.pm
1 package Pisg
::Parser
::Format
::konversation
;
3 # Documentation for the Pisg::Parser::Format modules is found in Template.pm
10 my ($type, %args) = @_;
13 normalline
=> '^\[[^\[]+\[(\d+)[^\]]+\]\s+<([^>]+)>\s+(.*)$',
14 actionline
=> '^\[[^\[]+\[(\d+)[^\]]+\]\s+\*\s(\S+)\s(.*)$',
15 thirdline
=> '^\[[^\[]+\[(\d+):(\d+)[^\]]+\]\s(\S+)\s+(\S+)\s(.*)$',
24 my ($self, $line, $lines) = @_;
27 if ($line =~ /$self->{normalline}/o) {
40 my ($self, $line, $lines) = @_;
43 if ($line =~ /$self->{actionline}/o) {
56 my ($self, $line, $lines) = @_;
59 if ($line =~ /$self->{thirdline}/o) {
65 # Hack to remove You as a nick
66 $hash{nick
} = $self->{cfg
}->{maintainer
};
71 $hash{newmode
} =~ s/^[^+-]*//;
73 } elsif ($3 eq 'Join') {
76 } elsif ($3 eq 'Nick') {
78 $hash{newnick
} =~ s/^.*\s+(\S+)$/$1/;
80 } elsif ($3 eq 'Kick') {
81 if ($5 =~ /^have kicked (\S+) from the channel \((.+)\).$/ ) {
82 $hash{kicker
} = $hash{nick
};
85 } elsif ($5 =~ /^has been kicked from the channel by (\S+) \((.+)\).$/ ) {
92 } elsif ($3 eq 'Topic') {
93 if ($5 =~ /the channel topic to "(.*)"\.$/) {