Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- my $logfilehandle;
- sub loader {
- ...
- open($logfilehandle, “>>feed.html”) or print “error: $!”;
- }
- sub observe_nick {
- my ($nick, $host, $chan, $text) = @_;
- print “chanlog [$chan] <$nick> $text\n”;
- if ($text =~ /^[W|w]elcome/ && $nick eq “Light”) {
- print “ignoring welcome msg\n”;
- return;
- }
- # escape html codes
- $text =~ s/</\</;
- $text =~ s/>/\>/;
- print $logfilehandle “$nick - $chan - $text<br><br>\n”;
- }
- sub unloader {
- ...
- close($logfilehandle) or die $!.”\n”;
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement