my $nick = parse_user $$rfullname;
my $mynick = $irc->nick_name;
- seen $self, $irc, $1, $$rchannels->[0], $nick if $$rmessage =~ /^(?:$mynick [,:])?\s*seen\s+([^ ]+)/x;
+ seen $self, $irc, $1, $$rchannels->[0], $nick if $$rmessage =~ /^(?:$mynick [,:])?\s*!?seen\s+([^ ]+)/x;
log_event $self, $nick => "on $$rchannels->[0] saying $$rmessage"
}
my ($self, $irc, $rfullname, $rtargets, $rmessage) = @_;
my $nick = parse_user $$rfullname;
- seen $self, $irc, $$rmessage, $$rtargets->[0], $nick if $$rmessage =~ /^seen\s+([^ ]+)/
+ seen $self, $irc, $$rmessage, $$rtargets->[0], $nick if $$rmessage =~ /^\s*!?seen\s+([^ ]+)/
}
1;
}
runtest 'something', undef, 'initialize';
-runtest 'bot: seen mgv', 'I last saw mgv now on #chan saying something', 'public';
+runtest 'seen mgv', 'I last saw mgv now on #chan saying something', 'public';
$self->S_ctcp_action($mockirc, $rmgv, \$channels, \'sleeping');
-runtest 'bot: seen mgv', 'I last saw mgv now on #chan doing: * sleeping', 'ctcp_action';
+runtest '!seen mgv', 'I last saw mgv now on #chan doing: * sleeping', 'ctcp_action';
$self->S_join($mockirc, $rmgv, \'#chan');
runtest 'bot: seen mgv', 'I last saw mgv now joining #chan', 'join';
$self->S_part($mockirc, $rmgv, \'#chan', \'');
-runtest 'bot: seen mgv', 'I last saw mgv now parting #chan', 'part without message';
+runtest 'bot: !seen mgv', 'I last saw mgv now parting #chan', 'part without message';
$self->S_part($mockirc, $rmgv, \'#chan', \'buh-bye');
runtest 'bot: seen mgv', "I last saw mgv now parting #chan with message 'buh-bye'", 'part with message';